From 71d5dd091643a7a9ce76a528e2b4563ab165ca36 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 3 Nov 2014 21:22:12 +0100 Subject: demux: don't consider stream EOF an underrun In this case, we didn't find any new packets for this stream, even though we've read ahead as much as possible. (If reading ahead in this case, the "Too many packets in the demuxer packet queues" error is normally printed.) If we do consider this an underrun, handle_pause_on_low_cache() will pause and show the "buffering" state, which is not useful. Could also happen on very bad interleaving. --- demux/demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demux/demux.c b/demux/demux.c index d4206228d5..5e7268d622 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -1219,7 +1219,7 @@ static int cached_demux_control(struct demux_internal *in, int cmd, void *arg) for (int n = 0; n < in->d_user->num_streams; n++) { struct demux_stream *ds = in->d_user->streams[n]->ds; if (ds->active) { - r->underrun |= !ds->head; + r->underrun |= !ds->head && !ds->eof; r->ts_range[0] = MP_PTS_MAX(r->ts_range[0], ds->base_ts); r->ts_range[1] = MP_PTS_MIN(r->ts_range[1], ds->last_ts); } -- cgit v1.2.3