summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-02-12 20:28:07 +0100
committerwm4 <wm4@nowhere>2016-02-12 20:28:07 +0100
commitcf323d0cc1d9b5fd36a414b1f953e5680964671f (patch)
treef1ee17449e2915063265e65c1efaec5424b29a4e
parentf9f3175487f9d3732ada3d7acd7d5472c8a069c0 (diff)
downloadmpv-cf323d0cc1d9b5fd36a414b1f953e5680964671f.tar.bz2
mpv-cf323d0cc1d9b5fd36a414b1f953e5680964671f.tar.xz
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.
-rw-r--r--player/lavfi.c13
1 files changed, 13 insertions, 0 deletions
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);
}
}