diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-11 12:29:22 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-11 12:29:32 +0100 |
commit | 10ec2308b0d41291e38dfca6ad885bbe29302519 (patch) | |
tree | 140b86b0147504ecbe5b12a1067ab86fbc9843a6 /libavformat/utils.c | |
parent | ac476bfa9f90587eadef5b98cfc40ec77dde3f18 (diff) | |
parent | b9500bf864e9b5619f9d3b1331f4487a1a70ecf4 (diff) | |
download | ffmpeg-10ec2308b0d41291e38dfca6ad885bbe29302519.tar.gz |
Merge remote-tracking branch 'qatar/release/0.5' into release/0.5
* qatar/release/0.5: (21 commits)
vp6: properly fail on unsupported feature
vp56: release frames on error
shorten: Use separate pointers for the allocated memory for decoded samples.
shorten: check for realloc failure
h264: check context state before decoding slice data partitions
oggdec: check memory allocation
Fix uninitialized reads on malformed ogg files.
lavf: avoid integer overflow in ff_compute_frame_duration()
yuv4mpeg: reject unsupported codecs
tiffenc: Check av_malloc() results.
mpegaudiodec: fix short_start calculation
h264: avoid stuck buffer pointer in decode_nal_units
yuv4mpeg: return proper error codes.
avidec: return 0, not packet size from read_packet().
cavsdec: check for changing w/h.
avidec: use actually read size instead of requested size
bytestream: add a new set of bytestream functions with overread checking
avsdec: Set dimensions instead of relying on the demuxer.
lavfi: avfilter_merge_formats: handle case where inputs are same
bmpdec: only initialize palette for pal8.
...
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 223d567f75..271502327f 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -680,7 +680,10 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st, *pnum = st->codec->time_base.num; *pden = st->codec->time_base.den; if (pc && pc->repeat_pict) { - *pnum = (*pnum) * (1 + pc->repeat_pict); + if (*pnum > INT_MAX / (1 + pc->repeat_pict)) + *pden /= 1 + pc->repeat_pict; + else + *pnum *= 1 + pc->repeat_pict; } } break; |