summaryrefslogtreecommitdiffstats
path: root/stream/stream_file.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-19 17:06:00 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:35 +0200
commit29a51900c6047798244afaca271618caeeeeeee8 (patch)
tree3e73ce26d1eab368df29731b2880c0bd0b46c37f /stream/stream_file.c
parentd33e5972b38c1a8d1ed2c19095a94c70c33881c3 (diff)
downloadmpv-29a51900c6047798244afaca271618caeeeeeee8.tar.bz2
mpv-29a51900c6047798244afaca271618caeeeeeee8.tar.xz
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.
Diffstat (limited to 'stream/stream_file.c')
-rw-r--r--stream/stream_file.c2
1 files changed, 1 insertions, 1 deletions
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;
}