diff options
author | wm4 <wm4@nowhere> | 2019-07-07 00:32:28 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:05 +0200 |
commit | e6911f82a579f202765fc382d219447c686d8e54 (patch) | |
tree | 9d25a5f75dfd218b2dbd4d52751dedc23039acac /demux/demux.c | |
parent | 9e1945d3074dbde9e730ae8be8eea7b86e9b7112 (diff) | |
download | mpv-e6911f82a579f202765fc382d219447c686d8e54.tar.bz2 mpv-e6911f82a579f202765fc382d219447c686d8e54.tar.xz |
demux: don't clobber internal demuxer EOF state in cache seeks
The last_eof field is the last known EOF state from the underlying
demuxer. Normally, seeks reset it, because obviously if seek back into
the middle of the file, you don't want last_eof to have a "wrong" value
for a short time window (until a packet is read, which would reset the
field to its correct value).
This shouldn't happen during cache seeks, because you don't touch the
underlying demuxer state.
At first, I made this change because some other work in progress
required it. It turned out that it was unnecessary, but keep the change
anyway, since it's still correct and makes the logic cleaner.
Diffstat (limited to 'demux/demux.c')
-rw-r--r-- | demux/demux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c index 9b8e62dc26..b7f650bff7 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -2311,6 +2311,7 @@ static void execute_seek(struct demux_internal *in) { int flags = in->seek_flags; double pts = in->seek_pts; + in->last_eof = false; in->seeking = false; in->seeking_in_progress = pts; in->demux_ts = MP_NOPTS_VALUE; @@ -3626,7 +3627,6 @@ static bool queue_seek(struct demux_internal *in, double seek_pts, int flags, } in->eof = false; - in->last_eof = false; in->idle = true; in->reading = false; in->back_demuxing = set_backwards; |