[vlc-devel] [PATCH 2/2] vout: spu: remove useless picture allocation

Thomas Guillem thomas at gllm.fr
Wed Jun 5 09:54:59 CEST 2019


---
 src/video_output/vout_subpictures.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 0cc102136d..bd07493ce1 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -1012,13 +1012,12 @@ static void SpuRenderRegion(spu_t *spu,
         }
     }
 
-    subpicture_region_t *dst = *dst_ptr = subpicture_region_New(&region_fmt);
+    subpicture_region_t *dst = *dst_ptr = subpicture_region_NewInternal(&region_fmt);
     if (dst) {
         dst->i_x       = x_offset;
         dst->i_y       = y_offset;
         dst->i_align   = 0;
-        if (dst->p_picture)
-            picture_Release(dst->p_picture);
+        assert(!dst->p_picture);
         dst->p_picture = picture_Hold(region_picture);
         int fade_alpha = 255;
         if (subpic->b_fade) {
-- 
2.20.1



More information about the vlc-devel mailing list