Browse Source

libavdevice/lavfi: check avfilter_graph_dump return value

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3
Zhao Zhili Michael Niedermayer 6 years ago
parent
commit
19956d01cc
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      libavdevice/lavfi.c

+ 7
- 3
libavdevice/lavfi.c View File

@@ -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