summaryrefslogtreecommitdiffstats
path: root/player/lavfi.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/lavfi.c')
-rw-r--r--player/lavfi.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/player/lavfi.c b/player/lavfi.c
index c597387937..ee0ca281e4 100644
--- a/player/lavfi.c
+++ b/player/lavfi.c
@@ -249,12 +249,19 @@ struct lavfi *lavfi_create(struct mp_log *log, char *graph_string)
void lavfi_destroy(struct lavfi *c)
{
+ if (!c)
+ return;
free_graph(c);
clear_data(c);
av_frame_free(&c->tmp_frame);
talloc_free(c);
}
+const char *lavfi_get_graph(struct lavfi *c)
+{
+ return c->graph_string;
+}
+
struct lavfi_pad *lavfi_find_pad(struct lavfi *c, char *name)
{
for (int n = 0; n < c->num_pads; n++) {
@@ -484,9 +491,11 @@ static void dump_graph(struct lavfi *c)
#endif
}
-void lavfi_set_hwdec_devs(struct lavfi *c, struct mp_hwdec_devices *hwdevs)
+void lavfi_pad_set_hwdec_devs(struct lavfi_pad *pad,
+ struct mp_hwdec_devices *hwdevs)
{
- c->hwdec_devs = hwdevs;
+ // We don't actually treat this per-pad.
+ pad->main->hwdec_devs = hwdevs;
}
// Initialize the graph if all inputs have formats set. If it's already