Merge commit '73c6ec6d659bab11ac424a4ba6ce3a56246295ee' into merge
[ffmpeg.git] / ffmpeg.c
index e52a7362c3b29b7a713edb746e5efd8533885802..8677f26c1ed564402463082d5f77e699498172d9 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3069,11 +3069,10 @@ static int transcode_init(void)
                 exit_program(1);
 #endif
 
-            if (!ost->filter &&
-                (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO ||
-                 enc_ctx->codec_type == AVMEDIA_TYPE_AUDIO)) {
-                    FilterGraph *fg;
-                    fg = init_simple_filtergraph(ist, ost);
+            if ((enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO ||
+                 enc_ctx->codec_type == AVMEDIA_TYPE_AUDIO) &&
+                 filtergraph_is_simple(ost->filter->graph)) {
+                    FilterGraph *fg = ost->filter->graph;
                     if (configure_filtergraph(fg)) {
                         av_log(NULL, AV_LOG_FATAL, "Error opening filters!\n");
                         exit_program(1);