[vlc-commits] [Git][videolan/vlc][master] vout: do not trigger OSD for vout reset callbacks when unchanged
Hugo Beauzée-Luyssen
gitlab at videolan.org
Wed May 5 08:33:54 UTC 2021
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
badb301c by Francois Cartegnie at 2021-05-05T08:17:59+00:00
vout: do not trigger OSD for vout reset callbacks when unchanged
- - - - -
2 changed files:
- src/player/osd.c
- src/video_output/vout_intf.c
Changes:
=====================================
src/player/osd.c
=====================================
@@ -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)
=====================================
src/video_output/vout_intf.c
=====================================
@@ -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" );
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/badb301cec5a53d19741fc5d61f0f2c488832b0f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/badb301cec5a53d19741fc5d61f0f2c488832b0f
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list