[vlc-commits] android_window: create sub filter after sub pic alloc
Thomas Guillem
git at videolan.org
Tue Nov 25 17:10:50 CET 2014
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Nov 25 16:17:21 2014 +0100| [fb1e47e8ebcd04afb57957682c963b491efd3874] | committer: Jean-Baptiste Kempf
android_window: create sub filter after sub pic alloc
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fb1e47e8ebcd04afb57957682c963b491efd3874
---
modules/video_output/android/android_window.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/modules/video_output/android/android_window.c b/modules/video_output/android/android_window.c
index 1c39bcd..5effdd9 100644
--- a/modules/video_output/android/android_window.c
+++ b/modules/video_output/android/android_window.c
@@ -799,13 +799,8 @@ static void SubpictureDisplay(vout_display_t *vd, subpicture_t *subpicture)
sys->p_sub_pic->p[0].i_pitch * sys->p_sub_pic->p[0].i_lines);
if (subpicture)
- {
- /* Allocate a blending filter if needed. */
- if (unlikely(!sys->p_spu_blend))
- sys->p_spu_blend = filter_NewBlend(VLC_OBJECT(vd),
- &sys->p_sub_pic->format);
picture_BlendSubpicture(sys->p_sub_pic, sys->p_spu_blend, subpicture);
- }
+
AndroidWindow_UnlockPicture(sys, sys->p_sub_window, sys->p_sub_pic, true);
}
@@ -842,8 +837,11 @@ static void Display(vout_display_t *vd, picture_t *picture,
if (!sys->p_sub_pic && SetupWindowSubtitleSurface(sys) == 0)
sys->p_sub_pic = PictureAlloc(sys, &sys->p_sub_window->fmt);
+ if (!sys->p_spu_blend)
+ sys->p_spu_blend = filter_NewBlend(VLC_OBJECT(vd),
+ &sys->p_sub_pic->format);
- if (sys->p_sub_pic)
+ if (sys->p_sub_pic && sys->p_spu_blend)
sys->b_has_subpictures = true;
}
/* As long as no subpicture was received, do not call
More information about the vlc-commits
mailing list