summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-08 11:13:43 +0200
committerwm4 <wm4@nowhere>2016-08-08 11:13:43 +0200
commit896a97c2e2cc57bad8d2df70fb731b41930af075 (patch)
tree128e0433155c78324ea5d4f4452e7bfd7b6a46b3
parent56c52bd2e13e87c93c031458c8bd5963d5f693fe (diff)
downloadmpv-896a97c2e2cc57bad8d2df70fb731b41930af075.tar.bz2
mpv-896a97c2e2cc57bad8d2df70fb731b41930af075.tar.xz
demux: do not add packets between refresh seek requested and done
Could cause strange issues on seeks or track switches, was only visible as race condition.
-rw-r--r--demux/demux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 3d61444ee2..5b4b3ec4c2 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -476,7 +476,7 @@ void demux_add_packet(struct sh_stream *stream, demux_packet_t *dp)
}
}
- if (!ds->selected || in->seeking || drop) {
+ if (!ds->selected || ds->need_refresh || in->seeking || drop) {
pthread_mutex_unlock(&in->lock);
talloc_free(dp);
return;