[vlc-commits] vout: android: don't overwrite projection_mode for opaque

Zhao Zhili git at videolan.org
Wed Aug 22 09:15:37 CEST 2018


vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Wed Aug 22 11:52:43 2018 +0800| [12583bc5e5fe47e88c75f685ba04afb9ec9d08f0] | committer: Thomas Guillem

vout: android: don't overwrite projection_mode for opaque

Fix "Failed to adapt decoder format to display" and fallback to software
decoder.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=12583bc5e5fe47e88c75f685ba04afb9ec9d08f0
---

 modules/video_output/android/display.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/video_output/android/display.c b/modules/video_output/android/display.c
index 78c2331845..b7b71153a8 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -505,12 +505,6 @@ static int OpenCommon(vout_display_t *vd)
     vout_display_sys_t *sys;
     video_format_t sub_fmt;
 
-    /* There are three cases:
-     * 1. the projection_mode is PROJECTION_MODE_RECTANGULAR
-     * 2. gles2 vout failed
-     * 3. the module is forced */
-    vd->fmt.projection_mode = PROJECTION_MODE_RECTANGULAR;
-
     vout_window_t *embed =
         vout_display_NewWindow(vd, VOUT_WINDOW_TYPE_ANDROID_NATIVE);
 
@@ -619,6 +613,11 @@ static int Open(vlc_object_t *p_this)
     if (vd->fmt.i_chroma == VLC_CODEC_ANDROID_OPAQUE)
         return VLC_EGENERIC;
 
+    /* There are two cases:
+     * 1. the projection_mode is PROJECTION_MODE_RECTANGULAR
+     * 2. gles2 vout failed */
+    vd->fmt.projection_mode = PROJECTION_MODE_RECTANGULAR;
+
     return OpenCommon(vd);
 }
 



More information about the vlc-commits mailing list