mirror of
https://github.com/mpv-player/mpv.git
synced 2026-05-07 20:02:49 +00:00
player: make effective image_display_duration playback_speed aware
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
This commit is contained in:
committed by
Kacper Michajłow
parent
833e2f254e
commit
313beaf241
@@ -0,0 +1 @@
|
||||
effective `--image-display-duration` takes `--speed` into consideration now
|
||||
@@ -3409,6 +3409,9 @@ Window
|
||||
example if ``--length`` is used to reduce the length to 1 frame, or if
|
||||
you seek to the last frame.
|
||||
|
||||
The effective duration is now `--speed` aware, which was not the case in
|
||||
older mpv versions before v0.41.0.
|
||||
|
||||
This option does not affect the framerate used for ``mf://`` or
|
||||
``--merge-files``. For that, use ``--mf-fps`` instead.
|
||||
|
||||
|
||||
+1
-1
@@ -8148,7 +8148,7 @@ void mp_option_run_callback(struct MPContext *mpctx, struct mp_option_callback *
|
||||
if (opt_ptr == &opts->image_display_duration && mpctx->vo_chain
|
||||
&& mpctx->vo_chain->is_sparse && !mpctx->ao_chain
|
||||
&& mpctx->video_status == STATUS_DRAINING)
|
||||
mpctx->time_frame = opts->image_display_duration;
|
||||
mpctx->time_frame = opts->image_display_duration / opts->playback_speed;
|
||||
}
|
||||
|
||||
void mp_notify_property(struct MPContext *mpctx, const char *property)
|
||||
|
||||
+1
-1
@@ -1108,7 +1108,7 @@ void write_video(struct MPContext *mpctx)
|
||||
get_relative_time(mpctx);
|
||||
if (vo_c->is_sparse && !mpctx->ao_chain) {
|
||||
MP_VERBOSE(mpctx, "assuming this is an image\n");
|
||||
mpctx->time_frame += opts->image_display_duration;
|
||||
mpctx->time_frame += opts->image_display_duration / opts->playback_speed;
|
||||
} else if (mpctx->last_frame_duration > 0) {
|
||||
MP_VERBOSE(mpctx, "using demuxer frame duration for last frame\n");
|
||||
mpctx->time_frame += mpctx->last_frame_duration;
|
||||
|
||||
Reference in New Issue
Block a user