summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-08-22 19:06:51 +0200
committerwm4 <wm4@nowhere>2013-08-22 19:14:26 +0200
commitbc0abebe8e7baa3c0a725bdfe8f14a1236dd2d55 (patch)
tree971f39e91e68f1d37c82013dfafbff841a369375 /demux
parent6f86affef533e9ac861aa60be49c032d5c23d41a (diff)
downloadmpv-bc0abebe8e7baa3c0a725bdfe8f14a1236dd2d55.tar.bz2
mpv-bc0abebe8e7baa3c0a725bdfe8f14a1236dd2d55.tar.xz
demux: check whether stream is selected in demux_get_next_pts()
Otherwise, this would just try to demux a good chunk of the file, even though the operation can't succeed anyway. This caused some pretty strange issues, where perfectly valid use cases would print a "Too many packets in the demuxer packet queue..." message.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 5ffd42a971..ff59ef4250 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -466,7 +466,7 @@ struct demux_packet *demux_read_packet(struct sh_stream *sh)
// packets from the queue.
double demux_get_next_pts(struct sh_stream *sh)
{
- if (sh) {
+ if (sh && sh->ds->selected) {
ds_get_packets(sh);
if (sh->ds->head)
return sh->ds->head->pts;