[vlc-devel] commit: Core: Closed Captions memleak (Derk-Jan Hartman )
git version control
git at videolan.org
Tue Jun 2 19:39:41 CEST 2009
vlc | branch: 1.0-bugfix | Derk-Jan Hartman <hartman at videolan.org> | Tue Jun 2 15:35:14 2009 +0200| [cbaad1b2c9270a2914b3cef81849c73cf46f9fc3] | committer: Derk-Jan Hartman
Core: Closed Captions memleak
(cherry picked from commit 0c24ead9492d67eb087b6192abbbdf449a2cdae0)
Signed-off-by: Derk-Jan Hartman <hartman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cbaad1b2c9270a2914b3cef81849c73cf46f9fc3
---
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 dd29460..514ef73 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1266,6 +1266,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;
@@ -1297,8 +1298,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