diff --git a/ffmpeg.c b/ffmpeg.c
index e9e2e23f07deb2f8e1d1e69a8240485329f67349..9d4a1c56d6325dde8d220451b0068a73e4011b16 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2623,7 +2623,7 @@ static int transcode_init(OutputFile *output_files, int nb_output_files,
 #if CONFIG_AVFILTER
                 if (configure_video_filters(ist, ost)) {
                     av_log(NULL, AV_LOG_FATAL, "Error opening filters!\n");
-                    exit(1);
+                    exit_program(1);
                 }
 #endif
                 break;