b/f: reset RTP-received timestamp when (re)starting process RTP stream

patch by Robert Szokovacs
sayer/1.4-spce2.6
Stefan Sayer 15 years ago
parent 7c87e3c238
commit 44889f80bb

@ -395,6 +395,7 @@ void AmMediaProcessorThread::process(AmEvent* e)
case AmMediaProcessor::InsertSession:
DBG("Session inserted to the scheduler\n");
sessions.insert(sr->s);
sr->s->RTPStream()->clearRTPTimeout();
break;
case AmMediaProcessor::RemoveSession:{

@ -678,6 +678,10 @@ void AmRtpStream::clearRTPTimeout(struct timeval* recv_time) {
memcpy(&last_recv_time, recv_time, sizeof(struct timeval));
}
void AmRtpStream::clearRTPTimeout() {
gettimeofday(&last_recv_time,NULL);
}
unsigned int AmRtpStream::bytes2samples(unsigned int) const {
ERROR("bytes2samples called on AmRtpStream\n");
return 0;

@ -308,6 +308,11 @@ public:
*/
void clearRTPTimeout(struct timeval* recv_time);
/*
* clear RTP timeout to current time
*/
void clearRTPTimeout();
virtual unsigned int bytes2samples(unsigned int) const;
/** set relay stream for RTP relaying */

Loading…
Cancel
Save