[vlc-devel] [PATCH 3/5] vout: reduce zoom ratio in order to avoid signalling unnecessary zoom events
Felix Abecassis
felix.abecassis at gmail.com
Wed Jan 29 16:37:43 CET 2014
For instance changing from 10:10 to 1:1 should not generate an event
if we are not in display fill mode.
---
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 5977638..52ffb61 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;
--
1.8.3.2
More information about the vlc-devel
mailing list