diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-10-07 00:32:22 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-10-07 00:32:22 +0000 |
commit | 9b272e327495dcb7110ea4c746adeda09765e099 (patch) | |
tree | d1c7d744610cae33a3c0be25bf16e762e821737c /libavformat | |
parent | 61138c43e08b7bb039fbcf50f1e71d6e735e04a5 (diff) | |
download | ffmpeg-9b272e327495dcb7110ea4c746adeda09765e099.tar.gz |
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
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpegenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |