[vlc-commits] android opaque: check error when locking the subtitles 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:18:50 2014 +0200| [2da3279c1765294d19980b0539d7fe7433942b8d] | committer: Felix Abecassis
android opaque: check error when locking the subtitles surface
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2da3279c1765294d19980b0539d7fe7433942b8d
---
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