aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rmdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-08 01:56:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-08 02:03:40 +0200
commit829e43017fa733479a72e6518bb9c1f0da441dc5 (patch)
tree3aed439a815c447314574ea29481938ea1f76e97 /libavformat/rmdec.c
parent8d14e1d64ee1780f839e05c22fc633b3cf1b8579 (diff)
parent494f2d4f9e834db1eaf1a7d0160d497f9802013d (diff)
downloadffmpeg-829e43017fa733479a72e6518bb9c1f0da441dc5.tar.gz
Merge commit '494f2d4f9e834db1eaf1a7d0160d497f9802013d' into release/1.1
* commit '494f2d4f9e834db1eaf1a7d0160d497f9802013d': vc1dec: Make sure last_picture is initialized in vc1_decode_skip_blocks r3d: Add more input value validation fraps: Make the input buffer size checks more strict svq3: Avoid a division by zero rmdec: Validate the fps value twinvqdec: Check the ibps parameter separately asfdec: Check the return value of asf_read_stream_properties mxfdec: set audio timebase to 1/samplerate Conflicts: libavcodec/fraps.c libavcodec/svq3.c libavformat/mxfdec.c tests/ref/fate/mxf-demux tests/ref/seek/lavf-mxf tests/ref/seek/lavf-mxf_d10 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r--libavformat/rmdec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index c2d2495e49..37d91ec12f 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -375,8 +375,13 @@ 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);
+ } else if (s->error_recognition & AV_EF_EXPLODE) {
+ av_log(s, AV_LOG_ERROR, "Invalid framerate\n");
+ return AVERROR_INVALIDDATA;
+ }
#if FF_API_R_FRAME_RATE
st->r_frame_rate = st->avg_frame_rate;
#endif