[vlc-commits] android/display: fix video_format_ApplyRotation call
Thomas Guillem
git at videolan.org
Fri Jan 5 14:01:11 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jan 5 13:58:44 2018 +0100| [21603b554cd010cbd3db1e2d641387dd113c059b] | committer: Thomas Guillem
android/display: fix video_format_ApplyRotation call
'*in' must be different than '*out' since both pointers are restrict.
Pointed-out-by: Zhao Zhili <quinkblack at foxmail.com>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=21603b554cd010cbd3db1e2d641387dd113c059b
---
modules/video_output/android/display.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/android/display.c b/modules/video_output/android/display.c
index 3bdf41478b..9571533bf8 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -476,7 +476,11 @@ error:
}
p_window->b_use_priv = false;
if (p_window->i_angle != 0)
- video_format_ApplyRotation(&p_window->fmt, &p_window->fmt);
+ {
+ video_format_t fmt;
+ video_format_ApplyRotation(&fmt, &p_window->fmt);
+ p_window->fmt = fmt;
+ }
return -1;
}
@@ -726,7 +730,11 @@ static int OpenCommon(vout_display_t *vd)
/* use software rotation if we don't use private anw */
if (!sys->p_window->b_opaque && !sys->p_window->b_use_priv)
- video_format_ApplyRotation(&vd->fmt, &vd->fmt);
+ {
+ video_format_t fmt;
+ video_format_ApplyRotation(&fmt, &vd->fmt);
+ vd->fmt = fmt;
+ }
msg_Dbg(vd, "using %s", sys->p_window->b_opaque ? "opaque" :
(sys->p_window->b_use_priv ? "ANWP" : "ANW"));
More information about the vlc-commits
mailing list