Commit 19956d01 authored by Zhao Zhili's avatar Zhao Zhili Committed by Michael Niedermayer

libavdevice/lavfi: check avfilter_graph_dump return value

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2205fb28
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment