Commit cabe7121 authored by Felix Abecassis's avatar Felix Abecassis Committed by 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.
parent bf5bc83e
......@@ -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;
......
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