]> git.sesse.net Git - vlc/commitdiff
libvlc_mediacontrol: fix object leaks.
authorRémi Duraffort <ivoire@videolan.org>
Mon, 17 Aug 2009 13:42:25 +0000 (15:42 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Mon, 17 Aug 2009 13:42:25 +0000 (15:42 +0200)
src/control/mediacontrol_audio_video.c

index 46e6da45fb6a025a644355dfb2e52c606d532e8b..330e90c6bfba3063ad9f8818becfe01b5be89eef 100644 (file)
@@ -85,6 +85,7 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
 
     if( vout_GetSnapshot( p_vout, &p_image, NULL, &fmt, "png", 500*1000 ) )
     {
+        vlc_object_release( p_vout );
         RAISE_NULL( mediacontrol_InternalException, "Snapshot exception" );
         return NULL;
     }
@@ -109,6 +110,8 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
 
     if( !p_pic )
         RAISE_NULL( mediacontrol_InternalException, "Out of memory" );
+
+    vlc_object_release( p_vout );
     return p_pic;
 }
 
@@ -150,6 +153,9 @@ mediacontrol_display_text( mediacontrol_Instance *self,
         RAISE_VOID( mediacontrol_InternalException, "No input" );
     }
     p_vout = input_GetVout( p_input );
+    /*FIXME: take care of the next fixme that can use p_input */
+    vlc_object_release( p_input );
+
     if( ! p_vout )
     {
         RAISE_VOID( mediacontrol_InternalException, "No video output" );