[vlc-commits] [Git][videolan/vlc][master] display: rectify zoom change condition
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Fri May 27 14:35:12 UTC 2022
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
b001ee46 by Rémi Denis-Courmont at 2022-05-27T14:15:38+00:00
display: rectify zoom change condition
This actually calls the zoom change control only when the effective
value of the zoom changes. Previous the control would be invoked even
with autoscale enabled, even though that effectively overrode the zoom.
- - - - -
1 changed file:
- src/video_output/display.c
Changes:
=====================================
src/video_output/display.c
=====================================
@@ -543,12 +543,13 @@ void vout_SetDisplayZoom(vout_display_t *vd, unsigned num, unsigned den)
{
vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
- if (!osys->cfg.display.autoscale
- && osys->cfg.display.zoom.num == num && osys->cfg.display.zoom.den == den)
- return; /* nothing to do */
-
osys->cfg.display.zoom.num = num;
osys->cfg.display.zoom.den = den;
+
+ if (osys->cfg.display.autoscale)
+ return; /* zoom has no effects */
+ if (osys->cfg.display.zoom.num * den == num * osys->cfg.display.zoom.den)
+ return; /* zoom has not changed */
if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_ZOOM))
vout_display_Reset(vd);
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b001ee4658dee5d9926e522a14f25e566385da1b
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b001ee4658dee5d9926e522a14f25e566385da1b
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list