aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-27 19:39:52 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-27 19:39:52 +0000
commite87ace6246fc6528a9a8304abdb81858c70cefb7 (patch)
tree480691ea02565f0c99ed940a1cc72a293c79f4e0 /libavcodec
parentf97d2d210553d64dccdc07da1eb9923fb46c5fcc (diff)
parent7486418683bd2477772e03aab573cf846c12fb0d (diff)
downloadffmpeg-e87ace6246fc6528a9a8304abdb81858c70cefb7.tar.gz
Merge commit '7486418683bd2477772e03aab573cf846c12fb0d'
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 37326e41f6..13ee243315 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1474,6 +1474,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (!avctx->rc_initial_buffer_occupancy)
avctx->rc_initial_buffer_occupancy = avctx->rc_buffer_size * 3 / 4;
+
+ if (avctx->ticks_per_frame &&
+ avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) {
+ av_log(avctx, AV_LOG_ERROR,
+ "ticks_per_frame %d too large for the timebase %d/%d.",
+ avctx->ticks_per_frame,
+ avctx->time_base.num,
+ avctx->time_base.den);
+ goto free_and_end;
+ }
}
avctx->pts_correction_num_faulty_pts =