[vlc-commits] android opaque: check error when locking the subtitles surface

Felix Abecassis git at videolan.org
Sun Jun 29 23:26:09 CEST 2014


vlc/vlc-2.2 | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Mon Jun 23 19:18:50 2014 +0200| [34f4ced8d9658eb2014a90e36bad65d850dc06ca] | committer: Jean-Baptiste Kempf

android opaque: check error when locking the subtitles surface

(cherry picked from commit 2da3279c1765294d19980b0539d7fe7433942b8d)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/android/opaque.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/android/opaque.c b/modules/video_output/android/opaque.c
index a289004..eac9d46 100644
--- a/modules/video_output/android/opaque.c
+++ b/modules/video_output/android/opaque.c
@@ -130,7 +130,11 @@ static void DisplaySubpicture(vout_display_t *vd, subpicture_t *subpicture)
     }
 
     ANativeWindow_Buffer buf = { 0 };
-    sys->native_window.winLock(sys->window, &buf, NULL);
+    int32_t err = sys->native_window.winLock(sys->window, &buf, NULL);
+    if (err) {
+        jni_UnlockAndroidSurface();
+        return;
+    }
 
     if (buf.width >= sys->fmt.i_width && buf.height >= sys->fmt.i_height)
     {



More information about the vlc-commits mailing list