From: Limin Wang <lance.lmw...@gmail.com> dumpgraph option currently uses string types, but actually only requires bool type
Signed-off-by: Limin Wang <lance.lmw...@gmail.com> --- doc/indevs.texi | 2 +- libavdevice/lavfi.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/indevs.texi b/doc/indevs.texi index 92bc65be41..19de11c516 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -979,7 +979,7 @@ filters. Syntax of the filtergraph is the same as the one specified by the option @var{graph}. @item dumpgraph -Dump graph to stderr. +Dump graph to stderr. Boolean value, by default disabled. @end table diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index ca8f05f3f7..0804a62b90 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -47,7 +47,7 @@ typedef struct { AVClass *class; ///< class for private options char *graph_str; char *graph_filename; - char *dump_graph; + int dump_graph; AVFilterGraph *graph; AVFilterContext **sinks; int *sink_stream_map; @@ -301,7 +301,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) goto end; if (lavfi->dump_graph) { - char *dump = avfilter_graph_dump(lavfi->graph, lavfi->dump_graph); + char *dump = avfilter_graph_dump(lavfi->graph, NULL); fputs(dump, stderr); fflush(stderr); av_free(dump); @@ -489,7 +489,7 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt) static const AVOption options[] = { { "graph", "set libavfilter graph", OFFSET(graph_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, { "graph_file","set libavfilter graph filename", OFFSET(graph_filename), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC}, - { "dumpgraph", "dump graph to stderr", OFFSET(dump_graph), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "dumpgraph", "dump graph to stderr", OFFSET(dump_graph), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DEC }, { NULL }, }; -- 2.21.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".