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 */