aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg_opt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-07 18:09:52 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-07 18:22:37 +0100
commit7efabffc2899b76688a40b4bd7c63370eb2d8ca8 (patch)
treeffdf6bd5bcfa6819b4d2747beb8a555744ab1383 /ffmpeg_opt.c
parent2d7fd4cc33d5b2b61fda4315d261bd72625eb252 (diff)
downloadffmpeg-7efabffc2899b76688a40b4bd7c63370eb2d8ca8.tar.gz
ffmpeg_opt: Check for av_realloc_array() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 7594b34578..dcd751d195 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1381,10 +1381,11 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
av_log(NULL, AV_LOG_FATAL, "error parsing rc_override\n");
exit_program(1);
}
- /* FIXME realloc failure */
video_enc->rc_override =
av_realloc_array(video_enc->rc_override,
i + 1, sizeof(RcOverride));
+ if (!video_enc->rc_override)
+ exit_program(1);
video_enc->rc_override[i].start_frame = start;
video_enc->rc_override[i].end_frame = end;
if (q > 0) {