Commit 9b272e32 authored by Michael Niedermayer's avatar Michael Niedermayer

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
parent 61138c43
......@@ -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;
......
e36a005ecca9add8bda6e0655d03716f *./tests/data/lavf/lavf.mpg
eed66277633e53724e58e3fca2709f41 *./tests/data/lavf/lavf.mpg
372736 ./tests/data/lavf/lavf.mpg
./tests/data/lavf/lavf.mpg CRC=0x2b39ed74
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment