summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-18 15:48:14 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:35 +0200
commitf9713921a372aa14ea631b0c546d3fbeade32b71 (patch)
treed3a8b403fe6272f5b89e27f82cd210e05d82aa56 /demux/demux.h
parenta0cce7f775e97aa364d166c278c49df1325e6cc7 (diff)
downloadmpv-f9713921a372aa14ea631b0c546d3fbeade32b71.tar.bz2
mpv-f9713921a372aa14ea631b0c546d3fbeade32b71.tar.xz
demux: add a "cancel" field
Instead of relying on demuxer->stream->cancel. This is better because the stream is potentially closed and replaced.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h3
1 files changed, 3 insertions, 0 deletions
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.