[vlc-commits] vout: spu: remove useless picture allocation and release

Thomas Guillem git at videolan.org
Thu Jun 6 07:40:14 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jun  5 09:54:16 2019 +0200| [b7421984bfedf1b5f6c56c3873196b79b1ecb081] | committer: Thomas Guillem

vout: spu: remove useless picture allocation and release

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b7421984bfedf1b5f6c56c3873196b79b1ecb081
---

 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) {



More information about the vlc-commits mailing list