[vlc-commits] splitter: remove picture deletion callback
Rémi Denis-Courmont
git at videolan.org
Wed Dec 26 20:56:20 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec 26 20:08:55 2018 +0200| [ee31d916b55b3038d01ef3ea2d09bb2e7a87ede8] | committer: Rémi Denis-Courmont
splitter: remove picture deletion callback
Use picture_Release() directly.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ee31d916b55b3038d01ef3ea2d09bb2e7a87ede8
---
include/vlc_video_splitter.h | 4 ++--
src/video_output/display.c | 8 --------
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/include/vlc_video_splitter.h b/include/vlc_video_splitter.h
index 1a64580194..9118cfb903 100644
--- a/include/vlc_video_splitter.h
+++ b/include/vlc_video_splitter.h
@@ -100,7 +100,6 @@ struct video_splitter_t
/* Buffer allocation */
int (*pf_picture_new) ( video_splitter_t *, picture_t *pp_picture[] );
- void (*pf_picture_del) ( video_splitter_t *, picture_t *pp_picture[] );
void *p_owner;
};
@@ -128,7 +127,8 @@ static inline int video_splitter_NewPicture( video_splitter_t *p_splitter,
static inline void video_splitter_DeletePicture( video_splitter_t *p_splitter,
picture_t *pp_picture[] )
{
- p_splitter->pf_picture_del( p_splitter, pp_picture );
+ for (int i = 0; i < p_splitter->i_output; i++)
+ picture_Release(pp_picture[i]);
}
/* */
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 8fe518762e..5f6f07a31a 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1141,14 +1141,7 @@ static int SplitterPictureNew(video_splitter_t *splitter, picture_t *picture[])
}
return VLC_SUCCESS;
}
-static void SplitterPictureDel(video_splitter_t *splitter, picture_t *picture[])
-{
- vout_display_t *wrapper = splitter->p_owner;
- vout_display_sys_t *wsys = wrapper->sys;
- for (int i = 0; i < wsys->count; i++)
- picture_Release(picture[i]);
-}
static void SplitterClose(vout_display_t *vd)
{
vout_display_sys_t *sys = vd->sys;
@@ -1205,7 +1198,6 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
/* */
splitter->p_owner = wrapper;
splitter->pf_picture_new = SplitterPictureNew;
- splitter->pf_picture_del = SplitterPictureDel;
/* */
TAB_INIT(sys->count, sys->display);
More information about the vlc-commits
mailing list