fixed check for return values to enable mp3 support.

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@31 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Raphael Coeffic 21 years ago
parent bd20e01ade
commit 3aacc375a6

@ -67,7 +67,7 @@ int AmPlaylist::put(unsigned int user_ts, unsigned char* buffer, unsigned int si
updateCurrentItem();
while(cur_item &&
cur_item->record &&
(ret = cur_item->record->put(user_ts,buffer,size)) <= 0){
(ret = cur_item->record->put(user_ts,buffer,size)) < 0){
DBG("put: gotoNextItem\n");
gotoNextItem();

@ -171,14 +171,6 @@ void AmSessionSchedulerThread::run()
while(true){
gettimeofday(&now,NULL);
// DBG("now: %i.%.6i; next_tick: %i.%.6i\n",
// now.tv_sec,now.tv_usec,next_tick.tv_sec,next_tick.tv_usec);
// struct timeval elaps;
// timersub(&now, &elaps, &elaps);
// DBG("jitter: %i.%.6i; \n",
// elaps.tv_sec,elaps.tv_usec - tick.tv_usec);
// elaps = now;
if(timercmp(&now,&next_tick,<)){
@ -238,7 +230,7 @@ void AmSessionSchedulerThread::processAudio(unsigned int ts)
case RTP_BUFFER_SIZE:
default:
ERROR("AmRtpAudio::receive() returned %i\n",ret);
postRequest(new SchedRequest(AmSessionScheduler::RemoveSession,s)); //removeSession(s);
postRequest(new SchedRequest(AmSessionScheduler::RemoveSession,s));
break;
}
}
@ -248,9 +240,9 @@ void AmSessionSchedulerThread::processAudio(unsigned int ts)
if (input) {
int ret = input->put(ts,buffer,size);
if(ret <= 0){
if(ret < 0){
DBG("input->put() returned: %i\n",ret);
postRequest(new SchedRequest(AmSessionScheduler::RemoveSession,s)); //removeSession(s);
postRequest(new SchedRequest(AmSessionScheduler::RemoveSession,s));
}
}
if (s->isDtmfDetectionEnabled())

Loading…
Cancel
Save