diff options
author | wm4 <wm4@nowhere> | 2018-05-18 15:48:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2018-05-24 19:56:35 +0200 |
commit | f9713921a372aa14ea631b0c546d3fbeade32b71 (patch) | |
tree | d3a8b403fe6272f5b89e27f82cd210e05d82aa56 /demux/demux.c | |
parent | a0cce7f775e97aa364d166c278c49df1325e6cc7 (diff) | |
download | mpv-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.c')
-rw-r--r-- | demux/demux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c index 0edfaa95bf..5f4c93b84f 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -2200,6 +2200,7 @@ static struct demuxer *open_given_type(struct mpv_global *global, *demuxer = (struct demuxer) { .desc = desc, .stream = stream, + .cancel = stream->cancel, .seekable = stream->seekable, .filepos = -1, .global = global, @@ -3136,7 +3137,7 @@ int demux_stream_control(demuxer_t *demuxer, int ctrl, void *arg) bool demux_cancel_test(struct demuxer *demuxer) { - return mp_cancel_test(demuxer->stream->cancel); + return mp_cancel_test(demuxer->cancel); } struct demux_chapter *demux_copy_chapter_data(struct demux_chapter *c, int num) |