1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-16 12:17:12 +00:00

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.
This commit is contained in:
wm4 2013-08-22 19:06:51 +02:00
parent 0440561c99
commit 69d46b1d95

View File

@ -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;