mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
command: group flag updates together
This commit is contained in:
@@ -7725,6 +7725,22 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags,
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & UPDATE_HWDEC) {
|
||||
struct track *track = mpctx->current_track[0][STREAM_VIDEO];
|
||||
struct mp_decoder_wrapper *dec = track ? track->dec : NULL;
|
||||
if (dec) {
|
||||
mp_decoder_wrapper_control(dec, VDCTRL_REINIT, NULL);
|
||||
double last_pts = mpctx->video_pts;
|
||||
if (last_pts != MP_NOPTS_VALUE)
|
||||
queue_seek(mpctx, MPSEEK_ABSOLUTE, last_pts, MPSEEK_EXACT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & UPDATE_DVB_PROG) {
|
||||
if (!mpctx->stop_play)
|
||||
mpctx->stop_play = PT_CURRENT_ENTRY;
|
||||
}
|
||||
|
||||
if (opt_ptr == &opts->vo->android_surface_size) {
|
||||
if (mpctx->video_out)
|
||||
vo_control(mpctx->video_out, VOCTRL_EXTERNAL_RESIZE, NULL);
|
||||
@@ -7772,17 +7788,6 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags,
|
||||
mp_wakeup_core(mpctx);
|
||||
}
|
||||
|
||||
if (flags & UPDATE_HWDEC) {
|
||||
struct track *track = mpctx->current_track[0][STREAM_VIDEO];
|
||||
struct mp_decoder_wrapper *dec = track ? track->dec : NULL;
|
||||
if (dec) {
|
||||
mp_decoder_wrapper_control(dec, VDCTRL_REINIT, NULL);
|
||||
double last_pts = mpctx->video_pts;
|
||||
if (last_pts != MP_NOPTS_VALUE)
|
||||
queue_seek(mpctx, MPSEEK_ABSOLUTE, last_pts, MPSEEK_EXACT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (opt_ptr == &opts->vo->window_scale)
|
||||
update_window_scale(mpctx);
|
||||
|
||||
@@ -7792,11 +7797,6 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags,
|
||||
if (opt_ptr == &opts->cursor_autohide_delay)
|
||||
mpctx->mouse_timer = 0;
|
||||
|
||||
if (flags & UPDATE_DVB_PROG) {
|
||||
if (!mpctx->stop_play)
|
||||
mpctx->stop_play = PT_CURRENT_ENTRY;
|
||||
}
|
||||
|
||||
if (opt_ptr == &opts->loop_file) {
|
||||
mpctx->remaining_file_loops = opts->loop_file;
|
||||
mp_notify_property(mpctx, "remaining-file-loops");
|
||||
|
||||
Reference in New Issue
Block a user