From 29a51900c6047798244afaca271618caeeeeeee8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 19 May 2018 17:06:00 +0200 Subject: player: some further cleanup of the mp_cancel crap Alway give each demuxer its own mp_cancel instance. This makes management of the mp_cancel things much easier. Also, instead of having add/remove functions for mp_cancel slaves, replace them with a simpler to use set_parent function. Remove cancel_and_free_demuxer(), which had mpctx as parameter only to check an assumption. With this commit, demuxers have their own mp_cancel, so add demux_cancel_and_free() which makes use of it. --- stream/stream_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stream/stream_file.c') diff --git a/stream/stream_file.c b/stream/stream_file.c index 785e96b12c..20b4d7c0c3 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -365,7 +365,7 @@ static int open_f(stream_t *stream) p->cancel = mp_cancel_new(p); if (stream->cancel) - mp_cancel_add_slave(stream->cancel, p->cancel); + mp_cancel_set_parent(p->cancel, stream->cancel); return STREAM_OK; } -- cgit v1.2.3