From 9b272e327495dcb7110ea4c746adeda09765e099 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 7 Oct 2010 00:32:22 +0000 Subject: Init SCR in mpeg muxer based on first DTS. This fixes issues if the first DTS is far away from 0. Originally committed as revision 25383 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/mpegenc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat/mpegenc.c') diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index b37a774295..f94b9fa8fa 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -1160,6 +1160,8 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) pts= pkt->pts; dts= pkt->dts; + if(!s->last_scr) + s->last_scr= dts; if(pts != AV_NOPTS_VALUE) pts += preload; if(dts != AV_NOPTS_VALUE) dts += preload; -- cgit v1.2.3