Browse Source

matroskadec: sanitize track time_scale before using it

fix issue628

Originally committed as revision 15280 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Aurelien Jacobs 17 years ago
parent
commit
3fc9d7cec4
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/matroskadec.c

+ 2
- 0
libavformat/matroskadec.c View File

@@ -1274,6 +1274,8 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
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;


Loading…
Cancel
Save