Commit f5b73de6 authored by François Cartegnie's avatar François Cartegnie 🤞

vout: do not trigger OSD for vout reset callbacks when unchanged

parent 68b27c23
Pipeline #92796 passed with stage
in 20 minutes and 15 seconds
......@@ -323,10 +323,10 @@ vlc_player_vout_OSDCallback(vlc_object_t *this, const char *var,
free(mode);
}
else if (strcmp(var, "sub-margin") == 0)
else if (strcmp(var, "sub-margin") == 0 && newval.i_int != oldval.i_int)
vouts_osd_Message(&vout, 1, _("Subtitle position %d px"), newval.i_int);
else if (strcmp(var, "secondary-sub-margin") == 0)
else if (strcmp(var, "secondary-sub-margin") == 0 && newval.i_int != oldval.i_int)
vouts_osd_Message(&vout, 1, _("Secondary subtitle position %d px"), newval.i_int);
else if (strcmp(var, "sub-text-scale") == 0)
......
......@@ -313,6 +313,8 @@ void vout_IntfReinit( vout_thread_t *p_vout )
var_TriggerCallback( p_vout, "video-filter" );
var_TriggerCallback( p_vout, "sub-source" );
var_TriggerCallback( p_vout, "sub-filter" );
/* !Warn those will trigger also vlc_player_vout_OSDCallback and
cause unwanted OSD on vout start. Filter out it there. */
var_TriggerCallback( p_vout, "sub-margin" );
var_TriggerCallback( p_vout, "secondary-sub-margin" );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment