From cf323d0cc1d9b5fd36a414b1f953e5680964671f Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Feb 2016 20:28:07 +0100 Subject: lavfi: dump the filter graph Especially useful to see what video formats are involved on the various filter links. I suspect this function is not available on Libav, so add necessary ifdeffery preemptively. --- player/lavfi.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'player') diff --git a/player/lavfi.c b/player/lavfi.c index 57f70fa443..ada66e7475 100644 --- a/player/lavfi.c +++ b/player/lavfi.c @@ -429,6 +429,17 @@ error: return false; } +static void dump_graph(struct lavfi *c) +{ +#if LIBAVFILTER_VERSION_MICRO >= 100 + MP_VERBOSE(c, "Filter graph:\n"); + char *s = avfilter_graph_dump(c->graph, NULL); + if (s) + MP_VERBOSE(c, "%s\n", s); + av_free(s); +#endif +} + // Initialize the graph if all inputs have formats set. If it's already // initialized, or can't be initialized yet, do nothing. static void init_graph(struct lavfi *c) @@ -451,6 +462,8 @@ static void init_graph(struct lavfi *c) } c->initialized = true; + + dump_graph(c); } } -- cgit v1.2.3