diff --git a/ffmpeg.c b/ffmpeg.c
index 40d7cc80fa5fe27eb09e1245ecfefb8f37602ad6..7f5aadd7fcc788faacf80c84225cf54b5f49c498 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2262,7 +2262,8 @@ void opt_output_file(const char *filename)
                         exit(1);
                     }
                     video_enc->rc_override= 
-                        realloc(video_enc->rc_override, sizeof(RcOverride)*(i+1));
+                        av_realloc(video_enc->rc_override, 
+                                   sizeof(RcOverride)*(i+1));
                     video_enc->rc_override[i].start_frame= start;
                     video_enc->rc_override[i].end_frame  = end;
                     if(q>0){