[vlc-devel] commit: Core: Closed Captions memleak (Derk-Jan Hartman )

git version control git at videolan.org
Tue Jun 2 15:36:12 CEST 2009


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Tue Jun  2 15:35:14 2009 +0200| [0c24ead9492d67eb087b6192abbbdf449a2cdae0] | committer: Derk-Jan Hartman 

Core: Closed Captions memleak

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

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

diff --git a/src/input/decoder.c b/src/input/decoder.c
index f4789d5..58e11fd 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1253,6 +1253,7 @@ static void DecoderGetCc( decoder_t *p_dec, decoder_t *p_dec_cc )
     decoder_owner_sys_t *p_owner = p_dec->p_owner;
     block_t *p_cc;
     bool pb_present[4];
+    bool b_processed = false;
     int i;
     int i_cc_decoder;
 
@@ -1284,8 +1285,12 @@ static void DecoderGetCc( decoder_t *p_dec, decoder_t *p_dec_cc )
         else
             DecoderProcess( p_owner->cc.pp_decoder[i], p_cc );
         i_cc_decoder--;
+        b_processed = true;
     }
     vlc_mutex_unlock( &p_owner->lock );
+
+    if( !b_processed )
+        block_Release( p_cc );
 }
 
 static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,




More information about the vlc-devel mailing list