libavdevice/lavfi: check avfilter_graph_dump return value

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/333/head
Zhao Zhili 5 years ago committed by Michael Niedermayer
parent 2205fb2810
commit 19956d01cc
  1. 10
      libavdevice/lavfi.c

@ -302,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 */

Loading…
Cancel
Save