mirror of
https://github.com/mpv-player/mpv
synced 2025-03-21 18:57:35 +00:00
command: handle changes to image-display-duration
When changing image-display-duration at runtime, make the new value take effect immediately, rather than from the next playlist-position change. This allows toggling the slideshow mode while viewing images (without hacks like executing playlist-play-index current afterwards). All the conditions are just to be safe since even if you set time_frame while playing a video, it's immediately overwritten by the next value.
This commit is contained in:
parent
24c05423a4
commit
bcf6077b28
@ -6739,6 +6739,11 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags,
|
||||
|
||||
if (opt_ptr == &opts->vo->taskbar_progress)
|
||||
update_vo_playback_state(mpctx);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
void mp_notify_property(struct MPContext *mpctx, const char *property)
|
||||
|
Loading…
Reference in New Issue
Block a user