summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/command.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/player/command.c b/player/command.c
index 89b257422d..4a3f10f7ce 100644
--- a/player/command.c
+++ b/player/command.c
@@ -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");