# HG changeset patch # User lucabe # Date 1265830388 0 # Node ID 7826bf6832108144d20abe28e3b27cfae324b18a # Parent ebf397240c91897a376e425974aa479318aa2da2 Fix syncronisation for streams with a high encoding delay. Patch by Timo Ter¸«£s (timo DOT teras AT iki DOT fi) diff -r ebf397240c91 -r 7826bf683210 rtpenc.c --- a/rtpenc.c Wed Feb 10 18:31:47 2010 +0000 +++ b/rtpenc.c Wed Feb 10 19:33:08 2010 +0000 @@ -91,7 +91,7 @@ s->cur_timestamp = 0; s->ssrc = 0; /* FIXME: was random(), what should this be? */ s->first_packet = 1; - s->first_rtcp_ntp_time = AV_NOPTS_VALUE; + s->first_rtcp_ntp_time = ntp_time(); max_packet_size = url_fget_max_packet_size(s1->pb); if (max_packet_size <= 12) @@ -171,7 +171,6 @@ dprintf(s1, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp); - if (s->first_rtcp_ntp_time == AV_NOPTS_VALUE) s->first_rtcp_ntp_time = ntp_time; s->last_rtcp_ntp_time = ntp_time; rtp_ts = av_rescale_q(ntp_time - s->first_rtcp_ntp_time, (AVRational){1, 1000000}, s1->streams[0]->time_base) + s->base_timestamp;