[vlc-commits] nativewindowpriv.c: fix warnings

Thomas Guillem git at videolan.org
Mon Aug 29 13:36:23 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Aug 25 14:34:07 2016 +0200| [a1a141457a559cdb1d85c5b6178385c11737c37c] | committer: Thomas Guillem

nativewindowpriv.c: fix warnings

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

 modules/video_output/android/nativewindowpriv.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/android/nativewindowpriv.c b/modules/video_output/android/nativewindowpriv.c
index 4e49665..e035b14 100644
--- a/modules/video_output/android/nativewindowpriv.c
+++ b/modules/video_output/android/nativewindowpriv.c
@@ -93,6 +93,8 @@ static int window_connect( ANativeWindow *anw )
 {
 #if ANDROID_ICS_OR_LATER
     return native_window_api_connect( anw, NATIVE_WINDOW_API_MEDIA );
+#else
+    return 0;
 #endif
 }
 
@@ -100,6 +102,8 @@ static int window_disconnect( ANativeWindow *anw )
 {
 #if ANDROID_ICS_OR_LATER
     return native_window_api_disconnect( anw, NATIVE_WINDOW_API_MEDIA );
+#else
+    return 0;
 #endif
 }
 
@@ -198,8 +202,12 @@ int ANativeWindowPriv_getMinUndequeued( native_window_priv *priv, unsigned int *
     status_t err;
 
 #if ANDROID_HC_OR_LATER
-    err = priv->anw->query( priv->anw, NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, min_undequeued );
+    int query;
+    err = priv->anw->query( priv->anw, NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &query );
     CHECK_ERR();
+    if( query < 0 )
+        return -1;
+    *min_undequeued = query;
 #endif
     /* set a minimum value of min_undequeued in case query fails */
     if( *min_undequeued == 0 )



More information about the vlc-commits mailing list