[vlc-devel] commit: snapshot: release the input ASAP ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Jan 14 21:41:44 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Jan 14 22:31:00 2009 +0200| [116fe975f19d22e2049a78ee75f55d5f22b5baca] | committer: Rémi Denis-Courmont 

snapshot: release the input ASAP

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

 src/control/mediacontrol_audio_video.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/control/mediacontrol_audio_video.c b/src/control/mediacontrol_audio_video.c
index c3dff03..6f7028b 100644
--- a/src/control/mediacontrol_audio_video.c
+++ b/src/control/mediacontrol_audio_video.c
@@ -72,7 +72,9 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
     {
         RAISE_NULL( mediacontrol_InternalException, "No input" );
     }
+
     p_vout = vlc_object_find( p_input, VLC_OBJECT_VOUT, FIND_CHILD );
+    vlc_object_release( p_input );
     if( ! p_vout )
     {
         RAISE_NULL( mediacontrol_InternalException, "No video output" );
@@ -96,7 +98,6 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
     p_snapshot = ( snapshot_t* ) p_cache->p_private;
     vlc_object_unlock( p_cache );
     vlc_object_release( p_cache );
-    vlc_object_release( p_input );
 
     if( p_snapshot )
     {




More information about the vlc-devel mailing list