[vlc-commits] android/opaque: check if subtitles_picture is not NULL
Thomas Guillem
git at videolan.org
Fri Oct 31 18:03:58 CET 2014
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Oct 31 17:17:22 2014 +0100| [4e943d01c2ec896b9f3cd3f5fbe5a6843f1392b1] | committer: Jean-Baptiste Kempf
android/opaque: check if subtitles_picture is not NULL
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e943d01c2ec896b9f3cd3f5fbe5a6843f1392b1
---
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
More information about the vlc-commits
mailing list