From 679e4108f29db061e85687af18f0e013c067f59b Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 28 Feb 2020 17:15:07 +0100 Subject: player: dumb seeking related stuff, make audio hr-seek default Try to deal with various corner cases. But when I fix one thing, another thing breaks. (And it's 50/50 whether I find the breakage immediately or a few months later.) So results may vary. The default for--hr-seek is changed to "default" (not creative enough to find a better name). In this mode, audio seeking is exact if there is no video, or if the video has only a single frame. This change is actually pretty dumb, since audio frames are usually small enough that exact seeking does not really add much. But it gets rid of some weird special cases. Internally, the most important change is that is_coverart and is_sparse handling is merged. is_sparse was originally just a special case for weird .ts streams that have the corresponding low-level flag set. The idea is that they're pretty similar anyway, so this would reduce the number of corner cases. But I'm not sure if this doesn't break the original intended use case for it (I don't have a sample anyway). This changes last-frame handling, and respects the duration of the last frame only if audio is disabled. This is mostly "coincidental" due to the need to make seeking past EOF trigger player exit, and is caused by setting STATUS_EOF early. On the other hand, this might have been this way before (see removed chunk close to it). --- DOCS/man/options.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'DOCS/man') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 74a623e6c5..59cd66ccbc 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -222,7 +222,7 @@ Playback Control chapter instead. A negative value means always go back to the previous chapter. -``--hr-seek=`` +``--hr-seek=`` Select when to use precise seeks that are not limited to keyframes. Such seeks require decoding video from the previous keyframe up to the target position and so can take some time depending on decoding performance. For @@ -234,6 +234,9 @@ Playback Control :absolute: Use precise seeks if the seek is to an absolute position in the file, such as a chapter seek, but not for relative seeks like the default behavior of arrow keys (default). + :default: Like ``absolute``, but enable hr-seeks in audio-only cases. The + exact behavior is implementation specific and may change with + new releases. :yes: Use precise seeks whenever possible. :always: Same as ``yes`` (for compatibility). -- cgit v1.2.3