[FFmpeg-cvslog] r25383 - in trunk: libavformat/mpegenc.c tests/ref/lavf/mpg

michael subversion
Thu Oct 7 02:32:22 CEST 2010


Author: michael
Date: Thu Oct  7 02:32:22 2010
New Revision: 25383

Log:
Init SCR in mpeg muxer based on first DTS.
This fixes issues if the first DTS is far away from 0.

Modified:
   trunk/libavformat/mpegenc.c
   trunk/tests/ref/lavf/mpg

Modified: trunk/libavformat/mpegenc.c
==============================================================================
--- trunk/libavformat/mpegenc.c	Wed Oct  6 23:43:46 2010	(r25382)
+++ trunk/libavformat/mpegenc.c	Thu Oct  7 02:32:22 2010	(r25383)
@@ -1160,6 +1160,8 @@ static int mpeg_mux_write_packet(AVForma
 
     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;

Modified: trunk/tests/ref/lavf/mpg
==============================================================================
--- trunk/tests/ref/lavf/mpg	Wed Oct  6 23:43:46 2010	(r25382)
+++ trunk/tests/ref/lavf/mpg	Thu Oct  7 02:32:22 2010	(r25383)
@@ -1,3 +1,3 @@
-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



More information about the ffmpeg-cvslog mailing list