summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-03 21:22:12 +0100
committerwm4 <wm4@nowhere>2014-11-03 21:22:12 +0100
commit71d5dd091643a7a9ce76a528e2b4563ab165ca36 (patch)
tree33188a10aa8bf4162d74473ce30baaac16db1a96
parent458a766dc9ee259767f1d648b72843398192551d (diff)
downloadmpv-71d5dd091643a7a9ce76a528e2b4563ab165ca36.tar.bz2
mpv-71d5dd091643a7a9ce76a528e2b4563ab165ca36.tar.xz
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.
-rw-r--r--demux/demux.c2
1 files changed, 1 insertions, 1 deletions
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);
}