0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

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.
This commit is contained in:
wm4 2016-02-12 20:28:07 +01:00
parent f9f3175487
commit cf323d0cc1

View File

@ -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);
}
}