]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/lavfi.c
avutil/opt: add full support for AV_OPT_TYPE_DICT
[ffmpeg] / libavdevice / lavfi.c
index 6f2ae958dcbf788b17f2f218f974fdd4dcde28c8..c949ff7e12472f046fb7c39e7cdcb5a2d5fc4e5a 100644 (file)
@@ -130,8 +130,6 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
     if (!pix_fmts)
         FAIL(AVERROR(ENOMEM));
 
-    avfilter_register_all();
-
     buffersink = avfilter_get_by_name("buffersink");
     abuffersink = avfilter_get_by_name("abuffersink");
 
@@ -304,9 +302,13 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
 
     if (lavfi->dump_graph) {
         char *dump = avfilter_graph_dump(lavfi->graph, lavfi->dump_graph);
-        fputs(dump, stderr);
-        fflush(stderr);
-        av_free(dump);
+        if (dump != NULL) {
+            fputs(dump, stderr);
+            fflush(stderr);
+            av_free(dump);
+        } else {
+            FAIL(AVERROR(ENOMEM));
+        }
     }
 
     /* fill each stream with the information in the corresponding sink */