calculate default_duration according to framerate only when not already set
authorAurelien Jacobs <aurel@gnuage.org>
Thu, 16 Aug 2007 21:54:04 +0000 (21:54 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Thu, 16 Aug 2007 21:54:04 +0000 (21:54 +0000)
Originally committed as revision 10125 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/matroskadec.c

index ace9917..b6a9893 100644 (file)
@@ -1099,6 +1099,7 @@ matroska_add_stream (MatroskaDemuxContext *matroska)
                             if ((res = ebml_read_float(matroska, &id,
                                                        &num)) < 0)
                                 break;
+                            if (!track->default_duration)
                             track->default_duration = 1000000000/(matroska->time_scale*num);
                             break;
                         }