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.
This commit is contained in:
wm4 2014-11-03 21:22:12 +01:00
parent 458a766dc9
commit 71d5dd0916
1 changed files with 1 additions and 1 deletions

View File

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