[vlc-commits] vout: factor vlc_object_release() call

Rémi Denis-Courmont git at videolan.org
Fri Jan 18 22:13:01 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jan 18 22:22:55 2019 +0200| [0c99e61a72cc01633cb94899e627b6b3bce9f2ed] | committer: Rémi Denis-Courmont

vout: factor vlc_object_release() call

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

 src/video_output/video_output.c  | 2 ++
 src/video_output/vout_internal.h | 8 +++-----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index b78a0d874a..6e91c14ad7 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -282,6 +282,8 @@ void vout_Close(vout_thread_t *vout)
     spu_Destroy(vout->p->spu);
     vout->p->spu = NULL;
     vlc_mutex_unlock(&vout->p->spu_lock);
+
+    vlc_object_release(vout);
 }
 
 /* */
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index b78c5c207b..66297c5385 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -167,10 +167,9 @@ vout_thread_t * vout_Request( vlc_object_t *object, const vout_configuration_t *
 #define vout_Request(a,b,c) vout_Request(VLC_OBJECT(a),b,c)
 
 /**
- * This function will close a vout created by vout_Request.
- * The associated vout module is closed.
- * Note: It is not released yet, you'll have to call vlc_object_release()
- * or use the convenient vout_CloseAndRelease().
+ * Destroys a vout.
+ *
+ * This function closes and releases a vout created by vout_Request().
  *
  * \param p_vout the vout to close
  */
@@ -185,7 +184,6 @@ void vout_Close( vout_thread_t *p_vout );
 static inline void vout_CloseAndRelease( vout_thread_t *p_vout )
 {
     vout_Close( p_vout );
-    vlc_object_release( p_vout );
 }
 
 /* TODO to move them to vlc_vout.h */



More information about the vlc-commits mailing list