[vlc-devel] [PATCH 2/3] android/opaque: check if subtitles_picture is not NULL

Thomas Guillem thomas at gllm.fr
Fri Oct 31 17:17:22 CET 2014


---
 modules/video_output/android/opaque.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/android/opaque.c b/modules/video_output/android/opaque.c
index 4cca792..6263b58 100644
--- a/modules/video_output/android/opaque.c
+++ b/modules/video_output/android/opaque.c
@@ -265,7 +265,8 @@ static void Close(vlc_object_t *p_this)
     if (sys->window)
         sys->native_window.winRelease(sys->window);
     dlclose(sys->p_library);
-    picture_Release(sys->subtitles_picture);
+    if (sys->subtitles_picture)
+        picture_Release(sys->subtitles_picture);
     if (sys->p_spu_blend)
         filter_DeleteBlend(sys->p_spu_blend);
     free(sys);
@@ -304,7 +305,7 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
     if (display_callback)
         display_callback(p_picsys);
 
-    if (subpicture)
+    if (subpicture && sys->subtitles_picture)
         sys->b_has_subpictures = true;
     /* As long as no subpicture was received, do not call
        DisplaySubpicture since JNI calls and clearing the subtitles
-- 
2.1.0




More information about the vlc-devel mailing list