[vlc-devel] [RFC PATCH 03/11] Android vout: check chroma before lib init

Thomas Guillem guillem at archos.com
Tue Jun 24 16:15:05 CEST 2014


---
 modules/video_output/android/surface.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/video_output/android/surface.c b/modules/video_output/android/surface.c
index 6aaa9ef..f6a183e 100644
--- a/modules/video_output/android/surface.c
+++ b/modules/video_output/android/surface.c
@@ -173,6 +173,10 @@ static void *InitLibrary(vout_display_sys_t *sys)
 static int Open(vlc_object_t *p_this)
 {
     vout_display_t *vd = (vout_display_t *)p_this;
+    video_format_t fmt = vd->fmt;
+
+    if (fmt.i_chroma == VLC_CODEC_ANDROID_OPAQUE)
+        return VLC_EGENERIC;
 
     /* */
     if (vlc_mutex_trylock(&single_instance) != 0) {
@@ -200,11 +204,6 @@ static int Open(vlc_object_t *p_this)
     }
 
     /* Setup chroma */
-    video_format_t fmt = vd->fmt;
-
-    if (fmt.i_chroma == VLC_CODEC_ANDROID_OPAQUE)
-        return VLC_EGENERIC;
-
     char *psz_fcc = var_InheritString(vd, CFG_PREFIX "chroma");
     if( psz_fcc ) {
         fmt.i_chroma = vlc_fourcc_GetCodecFromString(VIDEO_ES, psz_fcc);
-- 
1.7.10.4


-- 


This email and any files transmitted with it are confidential and are 
intended solely for the use of the individual or entity to which they are 
addressed. Access to this e-mail by anyone else is unauthorised. If you are 
not the intended recipient, any disclosure, copying, distribution or any 
action taken or omitted to be taken in reliance on it, is prohibited. 
E-mail messages are not necessarily secure. Archos does not accept 
responsibility for any changes made to this message after it was sent.



More information about the vlc-devel mailing list