mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 02:09:52 +00:00
demux: try not to read packets when cancelled
Essentially, this will make it abort sooner. Especially with DASH it might avoid confusing error messages, although exact behavior depends on timing.
This commit is contained in:
parent
7e6b37be07
commit
58c9f1a822
@ -661,7 +661,9 @@ static bool read_packet(struct demux_internal *in)
|
||||
demux->desc->seek(demux, seek_pts, SEEK_BACKWARD | SEEK_HR);
|
||||
}
|
||||
|
||||
bool eof = !demux->desc->fill_buffer || demux->desc->fill_buffer(demux) <= 0;
|
||||
bool eof = true;
|
||||
if (demux->desc->fill_buffer && !demux_cancel_test(demux))
|
||||
eof = demux->desc->fill_buffer(demux) <= 0;
|
||||
update_cache(in);
|
||||
|
||||
pthread_mutex_lock(&in->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user