mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 11:18:32 +00:00
demux: correctly report buffered size as 0 if there are no packets
Since the demuxer cache addition, ds->queue->head can actually be set to non-NULL, but the decoder can still be at EOF (with no packets to come). This made it report an unknown buffered size, instead of 0. Fix this by checking the decoder part of the packet queue instead. Probably doesn't matter much, but fixes an annoying "???" on the CLI status line in some situations.
This commit is contained in:
parent
075aa21797
commit
5f41fbb6d9
@ -2902,7 +2902,7 @@ static int cached_demux_control(struct demux_internal *in, int cmd, void *arg)
|
||||
r->underrun |= !ds->reader_head && !ds->eof;
|
||||
r->ts_reader = MP_PTS_MAX(r->ts_reader, ds->base_ts);
|
||||
r->ts_end = MP_PTS_MAX(r->ts_end, ds->queue->last_ts);
|
||||
any_packets |= !!ds->queue->head;
|
||||
any_packets |= !!ds->reader_head;
|
||||
}
|
||||
}
|
||||
r->idle = (in->idle && !r->underrun) || r->eof;
|
||||
|
Loading…
Reference in New Issue
Block a user