[vlc-commits] vout: reduce zoom ratio in order to avoid signalling unnecessary zoom events
Felix Abecassis
git at videolan.org
Sat Feb 8 15:26:21 CET 2014
vlc | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Wed Jan 29 14:37:43 2014 +0000| [cabe71212a0c4bce61e8ebcc52953eadd951597b] | committer: Jean-Baptiste Kempf
vout: reduce zoom ratio in order to avoid signalling unnecessary zoom events
For instance changing from 10:10 to 1:1 should not generate an event
if we are not in display fill mode.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cabe71212a0c4bce61e8ebcc52953eadd951597b
---
src/video_output/display.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index cd107fd..1f38c22 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1145,6 +1145,13 @@ void vout_SetDisplayZoom(vout_display_t *vd, int num, int den)
{
vout_display_owner_sys_t *osys = vd->owner.sys;
+ if (num > 0 && den > 0) {
+ vlc_ureduce(&num, &den, num, den, 0);
+ } else {
+ num = 1;
+ den = 1;
+ }
+
if (osys->is_display_filled ||
osys->zoom.num != num || osys->zoom.den != den) {
osys->ch_zoom = true;
More information about the vlc-commits
mailing list