[FFmpeg-cvslog] r15280 - trunk/libavformat/matroskadec.c

aurel subversion
Tue Sep 9 13:23:48 CEST 2008


Author: aurel
Date: Tue Sep  9 13:23:48 2008
New Revision: 15280

Log:
matroskadec: sanitize track time_scale before using it
fix issue628


Modified:
   trunk/libavformat/matroskadec.c

Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c	(original)
+++ trunk/libavformat/matroskadec.c	Tue Sep  9 13:23:48 2008
@@ -1274,6 +1274,8 @@ static int matroska_read_header(AVFormat
             av_log(matroska->ctx, AV_LOG_INFO,
                    "Unknown/unsupported CodecID %s.\n", track->codec_id);
 
+        if (track->time_scale < 0.01)
+            track->time_scale = 1.0;
         av_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */
 
         st->codec->codec_id = codec_id;




More information about the ffmpeg-cvslog mailing list