changeset 3912:32652a9c2624 libavformat

matroskadec: sanitize track time_scale before using it fix issue628
author aurel
date Tue, 09 Sep 2008 11:23:48 +0000
parents 308606d12c24
children 253050919116
files matroskadec.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroskadec.c	Tue Sep 09 02:56:13 2008 +0000
+++ b/matroskadec.c	Tue Sep 09 11:23:48 2008 +0000
@@ -1274,6 +1274,8 @@
             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;