[Ffmpeg-cvslog] CVS: ffmpeg/libavformat matroska.c,1.23,1.24

Michael Niedermayer CVS michael
Wed Mar 22 12:11:05 CET 2006


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

Modified Files:
	matroska.c 
Log Message:
duration and subitle fix from the patch by Steve Lhomme


Index: matroska.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/matroska.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- matroska.c	22 Mar 2006 11:06:08 -0000	1.23
+++ matroska.c	22 Mar 2006 11:11:02 -0000	1.24
@@ -305,9 +305,8 @@
     /* timescale in the file */
     int64_t time_scale;
 
-    /* length, position (time, ns) */
-    int64_t duration,
-        pos;
+    /* position (time, ns) */
+    int64_t pos;
 
     /* num_streams is the number of streams that av_new_stream() was called
      * for ( = that are available to the calling program). */
@@ -1094,7 +1093,7 @@
                 double num;
                 if ((res = ebml_read_float(matroska, &id, &num)) < 0)
                     break;
-                matroska->duration = num * matroska->time_scale;
+                matroska->ctx->duration = num * matroska->time_scale * 1000 / AV_TIME_BASE;
                 break;
             }
 
@@ -2245,6 +2244,8 @@
                 st->codec->codec_type = CODEC_TYPE_AUDIO;
                 st->codec->sample_rate = audiotrack->samplerate;
                 st->codec->channels = audiotrack->channels;
+            } else if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE) {
+                st->codec->codec_type = CODEC_TYPE_SUBTITLE;
             }
 
             /* What do we do with private data? E.g. for Vorbis. */





More information about the ffmpeg-cvslog mailing list