From f9713921a372aa14ea631b0c546d3fbeade32b71 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 18 May 2018 15:48:14 +0200 Subject: demux: add a "cancel" field Instead of relying on demuxer->stream->cancel. This is better because the stream is potentially closed and replaced. --- demux/demux.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'demux/demux.h') diff --git a/demux/demux.h b/demux/demux.h index 0150ce1a1a..ccbc6ae94a 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -233,6 +233,9 @@ typedef struct demuxer { struct mp_tags **update_stream_tags; int num_update_stream_tags; + // Triggered when ending demuxing forcefully. Usually bound to the stream too. + struct mp_cancel *cancel; + // Since the demuxer can run in its own thread, and the stream is not // thread-safe, only the demuxer is allowed to access the stream directly. // You can freely use demux_stream_control() to send STREAM_CTRLs. -- cgit v1.2.3