[vlc-commits] vout/android: utils: move AndroidOpaquePicture_DetachVout
Thomas Guillem
git at videolan.org
Mon Dec 19 12:06:43 CET 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Dec 8 11:03:47 2016 +0100| [151ac15198e983a7e67bfe189591e60b932edc08] | committer: Thomas Guillem
vout/android: utils: move AndroidOpaquePicture_DetachVout
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=151ac15198e983a7e67bfe189591e60b932edc08
---
modules/video_output/android/display.c | 18 ------------------
modules/video_output/android/display.h | 18 ++++++++++++++++++
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/modules/video_output/android/display.c b/modules/video_output/android/display.c
index 17c8b1d..20de334 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -179,24 +179,6 @@ static int UpdateWindowSize(vout_display_sys_t *sys, video_format_t *p_fmt,
return 0;
}
-static void AndroidOpaquePicture_DetachVout(picture_t *p_pic)
-{
- picture_sys_t *p_picsys = p_pic->p_sys;
-
- vlc_mutex_lock(&p_picsys->hw.lock);
- p_pic->p_sys->p_vd_sys = NULL;
- /* Release p_picsys if references from VOUT and from decoder are NULL */
- if (!p_picsys->p_vd_sys && !p_picsys->hw.p_dec)
- {
- vlc_mutex_unlock(&p_picsys->hw.lock);
- vlc_mutex_destroy(&p_picsys->hw.lock);
- free(p_picsys);
- }
- else
- vlc_mutex_unlock(&p_picsys->hw.lock);
- free(p_pic);
-}
-
static picture_t *PictureAlloc(vout_display_sys_t *sys, video_format_t *fmt,
bool b_opaque)
{
diff --git a/modules/video_output/android/display.h b/modules/video_output/android/display.h
index c8c54a3..919af2e 100644
--- a/modules/video_output/android/display.h
+++ b/modules/video_output/android/display.h
@@ -84,6 +84,24 @@ AndroidOpaquePicture_DetachDecoder(picture_sys_t *p_picsys)
vlc_mutex_unlock(&p_picsys->hw.lock);
}
+static inline void AndroidOpaquePicture_DetachVout(picture_t *p_pic)
+{
+ picture_sys_t *p_picsys = p_pic->p_sys;
+
+ vlc_mutex_lock(&p_picsys->hw.lock);
+ p_pic->p_sys->p_vd_sys = NULL;
+ /* Release p_picsys if references from VOUT and from decoder are NULL */
+ if (!p_picsys->p_vd_sys && !p_picsys->hw.p_dec)
+ {
+ vlc_mutex_unlock(&p_picsys->hw.lock);
+ vlc_mutex_destroy(&p_picsys->hw.lock);
+ free(p_picsys);
+ }
+ else
+ vlc_mutex_unlock(&p_picsys->hw.lock);
+ free(p_pic);
+}
+
static inline void
AndroidOpaquePicture_Release(picture_sys_t *p_picsys, bool b_render)
{
More information about the vlc-commits
mailing list