[Ffmpeg-cvslog] CVS: ffmpeg/libavformat matroska.c,1.26,1.27

Michael Niedermayer CVS michael
Sat Mar 25 20:51:15 CET 2006


Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv12396

Modified Files:
	matroska.c 
Log Message:
dont set random timestamps if they are not known


Index: matroska.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/matroska.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- matroska.c	25 Mar 2006 19:40:27 -0000	1.26
+++ matroska.c	25 Mar 2006 19:51:12 -0000	1.27
@@ -2417,7 +2417,7 @@
 
                 if (res == 0) {
                     for (n = 0; n < laces; n++) {
-                        uint64_t timecode = 0;
+                        uint64_t timecode = AV_NOPTS_VALUE;
 
                         pkt = av_mallocz(sizeof(AVPacket));
                         /* XXX: prevent data copy... */
@@ -2425,10 +2425,8 @@
                             res = AVERROR_NOMEM;
                             break;
                         }
-                        if (cluster_time != (uint64_t)-1) {
-                            if (block_time < 0 && (-block_time) > cluster_time)
-                                timecode = cluster_time;
-                            else
+                        if (cluster_time != (uint64_t)-1 && n == 0) {
+                            if (cluster_time + block_time >= 0)
                                 timecode = cluster_time + block_time;
                         }
                         /* FIXME: duration */





More information about the ffmpeg-cvslog mailing list