[vlc-commits] spu: avoid pointless alloc and indirection

Rémi Denis-Courmont git at videolan.org
Mon Jul 28 23:55:14 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 28 22:59:38 2014 +0300| [8e1a72a2f5f11126ddfe6685bf0a713ea15bbe71] | committer: Rémi Denis-Courmont

spu: avoid pointless alloc and indirection

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

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

diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index f8705f5..0d788a0 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -165,7 +165,6 @@ static void FilterRelease(filter_t *filter)
 {
     if (filter->p_module)
         module_unneed(filter, filter->p_module);
-    free(filter->owner.sys);
     vlc_object_release(filter);
 }
 
@@ -186,8 +185,7 @@ static int spu_get_attachments(filter_t *filter,
                                input_attachment_t ***attachment_ptr,
                                int *attachment_count)
 {
-    filter_owner_sys_t *sys = filter->owner.sys;
-    spu_t *spu = sys->spu;
+    spu_t *spu = filter->owner.sys;
 
     int ret = VLC_EGENERIC;
     if (spu->p->input)
@@ -203,9 +201,7 @@ static filter_t *SpuRenderCreateAndLoadText(spu_t *spu)
     if (!text)
         return NULL;
 
-    filter_owner_sys_t *sys = xmalloc(sizeof(*sys));
-    sys->spu = spu;
-    text->owner.sys = sys;
+    text->owner.sys = spu;
 
     es_format_Init(&text->fmt_in, VIDEO_ES, 0);
 



More information about the vlc-commits mailing list