[vlc-commits] android surface: check error when locking the video playback surface
Felix Abecassis
git at videolan.org
Mon Jun 23 19:29:15 CEST 2014
vlc | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Mon Jun 23 19:21:41 2014 +0200| [713ab83f6a19057634e4c9b9c758ca397ebfc8e3] | committer: Felix Abecassis
android surface: check error when locking the video playback surface
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=713ab83f6a19057634e4c9b9c758ca397ebfc8e3
---
modules/video_output/android/surface.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/android/surface.c b/modules/video_output/android/surface.c
index 139511d..6aaa9ef 100644
--- a/modules/video_output/android/surface.c
+++ b/modules/video_output/android/surface.c
@@ -388,7 +388,11 @@ static int AndroidLockSurface(picture_t *picture)
if (sys->native_window.winLock) {
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 VLC_EGENERIC;
+ }
info->w = buf.width;
info->h = buf.height;
info->bits = buf.bits;
More information about the vlc-commits
mailing list