[vlc-devel] commit: Fixed a potential vout object leak in decoder. (Laurent Aimar )

git version control git at videolan.org
Sun Nov 30 16:52:19 CET 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Nov 29 13:42:34 2008 +0100| [0dbfdd8726d1ebcb83734e87bab81a691170f969] | committer: Laurent Aimar 

Fixed a potential vout object leak in decoder.

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

 src/input/decoder.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index c61d07f..615a730 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -2043,10 +2043,10 @@ static void DeleteDecoder( decoder_t * p_dec )
         vout_thread_t *p_vout;
 
         p_vout = vlc_object_find( p_dec, VLC_OBJECT_VOUT, FIND_ANYWHERE );
-        if( p_vout && p_owner->p_spu_vout == p_vout )
+        if( p_vout )
         {
-            spu_Control( p_vout->p_spu, SPU_CHANNEL_CLEAR,
-                         p_owner->i_spu_channel );
+            if( p_owner->p_spu_vout == p_vout )
+                spu_Control( p_vout->p_spu, SPU_CHANNEL_CLEAR, p_owner->i_spu_channel );
             vlc_object_release( p_vout );
         }
     }




More information about the vlc-devel mailing list