[vlc-commits] android/display: add picture destroy callback
Rémi Denis-Courmont
git at videolan.org
Wed Dec 12 19:44:00 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec 12 20:34:32 2018 +0200| [95468818d2a22823748ed0d5238025b990fa9f34] | committer: Rémi Denis-Courmont
android/display: add picture destroy callback
Since there is something to free.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=95468818d2a22823748ed0d5238025b990fa9f34
---
modules/video_output/android/display.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/video_output/android/display.c b/modules/video_output/android/display.c
index 2cb5b0d6ca..dd21ed4599 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -176,6 +176,11 @@ static int UpdateVideoSize(vout_display_sys_t *sys, video_format_t *p_fmt)
return 0;
}
+static void AndroidPicture_Destroy(picture_t *pic)
+{
+ free(pic->p_sys);
+}
+
static picture_t *PictureAlloc(vout_display_sys_t *sys, video_format_t *fmt,
bool b_opaque)
{
@@ -200,7 +205,10 @@ static picture_t *PictureAlloc(vout_display_sys_t *sys, video_format_t *fmt,
rsc.pf_destroy = AndroidOpaquePicture_DetachVout;
}
else
+ {
p_picsys->sw.p_vd_sys = sys;
+ res.pf_destroy = AndroidPicture_Destroy;
+ }
p_pic = picture_NewFromResource(fmt, &rsc);
if (!p_pic)
More information about the vlc-commits
mailing list