summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-09 22:32:04 +0100
committerwm4 <wm4@nowhere>2015-03-09 22:32:04 +0100
commit39fa05d3742aea94c7638c5b9223d680459b7799 (patch)
treea3614047cd81153012aba53a98e9b816a733655a /demux/demux.c
parent5f0eda7b94e5af25970bfd5bef0cf401fe3a10e7 (diff)
downloadmpv-39fa05d3742aea94c7638c5b9223d680459b7799.tar.bz2
mpv-39fa05d3742aea94c7638c5b9223d680459b7799.tar.xz
demux_mkv: check for playback aborts
Check async abort notification. libavformat already do something equivalent. Before this commit, the demuxer could enter resync mode (and print silly warning messages) when the stream stopped returning data because of an abort.
Diffstat (limited to 'demux/demux.c')
-rw-r--r--demux/demux.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 16918e5453..e9edac78f8 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -1482,6 +1482,11 @@ void demux_unpause(demuxer_t *demuxer)
pthread_mutex_unlock(&in->lock);
}
+bool demux_cancel_test(struct demuxer *demuxer)
+{
+ return mp_cancel_test(demuxer->stream->cancel);
+}
+
struct demux_chapter *demux_copy_chapter_data(struct demux_chapter *c, int num)
{
struct demux_chapter *new = talloc_array(NULL, struct demux_chapter, num);