diff options
author | wm4 <wm4@nowhere> | 2012-11-13 00:56:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-11-16 21:21:15 +0100 |
commit | f1175cd905f5e89427ee7bfa14439ecdbffdfb11 (patch) | |
tree | c3b2edf96adeb97274b3f9918eea6eb34f2d6b68 /core/mp_core.h | |
parent | b7052b431c92c2babd032885701fb56dfd3ec452 (diff) | |
download | mpv-f1175cd905f5e89427ee7bfa14439ecdbffdfb11.tar.bz2 mpv-f1175cd905f5e89427ee7bfa14439ecdbffdfb11.tar.xz |
core: add --keep-open, which doesn't close the file on EOF
The --keep-open option causes mpv not to close the current file.
Instead, it will pause, and allow the user to seek around. When
seeking beyond the end of the file, mpv does a precise seek back to
the previous last known position that produced video output.
In some corner cases, mpv might not be able to produce video output at
all, despite having created a VO. (Possibly when only 1 frame could be
decoded, but the video filter chain queues frames. Then a VO would be
created, without sending an actual video frame to the VO.) In these
cases, the VO window will not redraw, not even OSD.
Based on a patch by coax [1].
[1] http://devel.mplayer2.org/ticket/210#comment:4
Diffstat (limited to 'core/mp_core.h')
-rw-r--r-- | core/mp_core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/mp_core.h b/core/mp_core.h index 6da6365ab6..0439ca13f5 100644 --- a/core/mp_core.h +++ b/core/mp_core.h @@ -215,6 +215,9 @@ typedef struct MPContext { * (or at least queued to be flipped by VO) */ double video_pts; double last_seek_pts; + // As video_pts, but is not reset when seeking away. (For the very short + // period of time until a new frame is decoded and shown.) + double last_vo_pts; // used to prevent hanging in some error cases unsigned int start_timestamp; |