Commit 34792682 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

android_window: set i_angle for anw too

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent fb1e47e8
...@@ -254,25 +254,24 @@ static android_window *AndroidWindow_New(vout_display_sys_t *sys, ...@@ -254,25 +254,24 @@ static android_window *AndroidWindow_New(vout_display_sys_t *sys,
} }
} }
if (p_window->b_use_priv) { switch (p_fmt->orientation)
switch (p_fmt->orientation) {
{ case ORIENT_ROTATED_90:
case ORIENT_ROTATED_90: p_window->i_angle = 90;
p_window->i_angle = 90; break;
break; case ORIENT_ROTATED_180:
case ORIENT_ROTATED_180: p_window->i_angle = 180;
p_window->i_angle = 180; break;
break; case ORIENT_ROTATED_270:
case ORIENT_ROTATED_270: p_window->i_angle = 270;
p_window->i_angle = 270; break;
break; default:
default: p_window->i_angle = 0;
p_window->i_angle = 0; }
} if (p_window->b_use_priv)
p_window->fmt = *p_fmt; p_window->fmt = *p_fmt;
} else { else
video_format_ApplyRotation(&p_window->fmt, p_fmt); video_format_ApplyRotation(&p_window->fmt, p_fmt);
}
p_window->i_pic_count = 1; p_window->i_pic_count = 1;
return p_window; return p_window;
} }
...@@ -375,7 +374,6 @@ error: ...@@ -375,7 +374,6 @@ error:
p_window->b_use_priv = false; p_window->b_use_priv = false;
if (p_window->i_angle != 0) if (p_window->i_angle != 0)
video_format_ApplyRotation(&p_window->fmt, &p_window->fmt); video_format_ApplyRotation(&p_window->fmt, &p_window->fmt);
p_window->i_angle = 0;
return -1; return -1;
} }
......
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