ffmpeg_opt: Use av_realloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 7 Jan 2015 16:26:39 +0000 (17:26 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 7 Jan 2015 17:22:37 +0000 (18:22 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg_opt.c

index ac93eb5..7594b34 100644 (file)
@@ -1383,8 +1383,8 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
             }
             /* FIXME realloc failure */
             video_enc->rc_override =
-                av_realloc(video_enc->rc_override,
-                           sizeof(RcOverride) * (i + 1));
+                av_realloc_array(video_enc->rc_override,
+                                 i + 1, sizeof(RcOverride));
             video_enc->rc_override[i].start_frame = start;
             video_enc->rc_override[i].end_frame   = end;
             if (q > 0) {