matroska: scale timecode according to time_scale
authorAurelien Jacobs <aurel@gnuage.org>
Tue, 28 Nov 2006 23:41:53 +0000 (23:41 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Tue, 28 Nov 2006 23:41:53 +0000 (23:41 +0000)
fixes jerky playback of planet.earth.mkv

Originally committed as revision 7181 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/matroska.c

index 582d7d8fd38a19b8fc96376a87d39900cf3c2e2c..0cd119e7115f22865439dd17da4c2d384f28e74a 100644 (file)
@@ -2536,7 +2536,7 @@ matroska_parse_blockgroup (MatroskaDemuxContext *matroska,
                         }
                         if (cluster_time != (uint64_t)-1 && n == 0) {
                             if (cluster_time + block_time >= 0)
-                                timecode = cluster_time + block_time;
+                                timecode = (cluster_time + block_time) * matroska->time_scale;
                         }
                         /* FIXME: duration */