summaryrefslogtreecommitdiffstats
path: root/demux/demux_mkv.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-27 22:16:30 +0100
committerwm4 <wm4@nowhere>2020-02-27 22:30:46 +0100
commitb56e2efd5f3d2ed5e62fe02acdaedef03b2d2fbc (patch)
tree2e2e0bfd88f0f5b6febb2c1fd35579e4ef9de9a1 /demux/demux_mkv.c
parent611c92ef1db2efa5c2f548c8ae3aa4072bbe67a8 (diff)
downloadmpv-b56e2efd5f3d2ed5e62fe02acdaedef03b2d2fbc.tar.bz2
mpv-b56e2efd5f3d2ed5e62fe02acdaedef03b2d2fbc.tar.xz
demux: simplify some internals, stop trying to read packets after EOF
Remove some redundant fields that controlled or indicated whether the demuxer was/could/should prefetch. Redefine how the eof/reading fields work. The in->eof field is now always valid, instead of weirdly being reset to false in random situations. The in->reading field now corresponds to whether the demuxer thread is working at all, and is reset if it stops doing anything. Also, I always found it stupid that dequeue_packet() forced the demuxer thread to retry reading if it was EOF. This makes little sense, but was probably added for files that are being appended to (running downloads). It makes no sense, because if the cache really tried to read until file EOF, it would encounter partial packets and throw errors, so all is lost anyway. Plus stream_file now handles this better. So stop this behavior, but add a temporary option that enables the old behavior. I think checking for ds->eager when enabling prefetching never really made sense (could be debated, but no, not really). On the other hand, the change above exposed a missing wakeup in the backward demuxing code. Some chances of regressions that could make it stuck in certain states or so, or incorrect demuxer cache state reporting to the player frontend.
Diffstat (limited to 'demux/demux_mkv.c')
0 files changed, 0 insertions, 0 deletions