Browse Source

fftools/ffmpeg_filter: stop setting a no-op option

Anton Khirnov 1 year ago
parent
commit
496b8d7a13
1 changed files with 3 additions and 9 deletions
  1. 3 9
      fftools/ffmpeg_filter.c

+ 3 - 9
fftools/ffmpeg_filter.c

@@ -1588,15 +1588,9 @@ static int configure_output_audio_filter(FilterGraph *fg, AVFilterGraph *graph,
     int ret;
     int ret;
 
 
     snprintf(name, sizeof(name), "out_%s", ofp->name);
     snprintf(name, sizeof(name), "out_%s", ofp->name);
-    ofp->filter = avfilter_graph_alloc_filter(graph,
-                                              avfilter_get_by_name("abuffersink"),
-                                              name);
-    if (!ofp->filter)
-        return AVERROR(ENOMEM);
-    if ((ret = av_opt_set_int(ofp->filter, "all_channel_counts", 1, AV_OPT_SEARCH_CHILDREN)) < 0)
-        return ret;
-
-    ret = avfilter_init_dict(ofp->filter, NULL);
+    ret = avfilter_graph_create_filter(&ofp->filter,
+                                       avfilter_get_by_name("abuffersink"),
+                                       name, NULL, NULL, graph);
     if (ret < 0)
     if (ret < 0)
         return ret;
         return ret;