diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-09-09 11:23:48 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-09-09 11:23:48 +0000 |
commit | 3fc9d7cec4ac4a04e7d60c39beae3be672d3792b (patch) | |
tree | fae13da6d97c0c0bf7debd551fca03257fc63c1e | |
parent | aa13b0fc55f5aec58fce24d1a047271b3e5727f1 (diff) | |
download | ffmpeg-3fc9d7cec4ac4a04e7d60c39beae3be672d3792b.tar.gz |
matroskadec: sanitize track time_scale before using it
fix issue628
Originally committed as revision 15280 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/matroskadec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e524261978..31fc214173 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -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; |