mirror of https://github.com/mpv-player/mpv
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:
parent
f9f3175487
commit
cf323d0cc1
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue