From 4e8052ddad23bc56a3f4f11e1d1c0ed6a1a9ad91 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timo=20Ter=C3=A4s?= Date: Wed, 10 Feb 2010 19:33:08 +0000 Subject: [PATCH] =?utf8?q?Fix=20syncronisation=20for=20streams=20with=20a?= =?utf8?q?=20high=20encoding=20delay.=20Patch=20by=20Timo=20Ter=C3=A4s=20(?= =?utf8?q?timo=20DOT=20teras=20AT=20iki=20DOT=20fi)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Originally committed as revision 21743 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rtpenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 640306a..9a3eee9 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -91,7 +91,7 @@ static int rtp_write_header(AVFormatContext *s1) 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 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time) 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; -- 2.7.4