mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 09:29:29 +00:00
demux: don't account known range for streams that are EOF
This influences the demuxer readahead display. If a stream has reached EOF, we want to ignore it for the purpose of this calculation. Note that if a stream contains no packets, it still should cause the value 0s to be displayed (unless it's EOF), because that's just the actual situation.
This commit is contained in:
parent
7c2c1dbe80
commit
5438a8b32e
@ -1222,8 +1222,10 @@ static int cached_demux_control(struct demux_internal *in, int cmd, void *arg)
|
||||
struct demux_stream *ds = in->d_user->streams[n]->ds;
|
||||
if (ds->active) {
|
||||
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);
|
||||
if (!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);
|
||||
}
|
||||
}
|
||||
}
|
||||
r->idle = (in->idle && !r->underrun) || r->eof;
|
||||
|
Loading…
Reference in New Issue
Block a user