diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-19 10:38:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-19 10:38:40 +0200 |
commit | f54d751f33375054d4ecf30301ef008c8e781f99 (patch) | |
tree | 2c464aaf76fbb32bb24e7855bc7062681d07f7a1 /libavformat | |
parent | f0606a28deca304462349f623118a79069938339 (diff) | |
parent | 0f310a6f333b016d336674d086045e8473fdf918 (diff) | |
download | ffmpeg-f54d751f33375054d4ecf30301ef008c8e781f99.tar.gz |
Merge commit '0f310a6f333b016d336674d086045e8473fdf918'
* commit '0f310a6f333b016d336674d086045e8473fdf918':
rmdec: Validate the fps value
Conflicts:
libavformat/rmdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rmdec.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 91f4241da4..278fc37b45 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -377,11 +377,16 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (avio_tell(pb) - codec_pos))) < 0) return ret; - av_reduce(&st->avg_frame_rate.den, &st->avg_frame_rate.num, - 0x10000, fps, (1 << 30) - 1); + if (fps > 0) { + av_reduce(&st->avg_frame_rate.den, &st->avg_frame_rate.num, + 0x10000, fps, (1 << 30) - 1); #if FF_API_R_FRAME_RATE - st->r_frame_rate = st->avg_frame_rate; + st->r_frame_rate = st->avg_frame_rate; #endif + } else if (s->error_recognition & AV_EF_EXPLODE) { + av_log(s, AV_LOG_ERROR, "Invalid framerate\n"); + return AVERROR_INVALIDDATA; + } } skip: |