Commit 34f4d18f authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix a memory leak when there is no p_vout, but when there are subs.

parent a3d8c682
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* subsdec.c : text subtitles decoder * subsdec.c : text subtitles decoder
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: subsdec.c,v 1.14 2003/12/14 23:14:20 hartman Exp $ * $Id: subsdec.c,v 1.15 2004/01/07 16:54:47 hartman Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -197,15 +197,16 @@ static void DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -197,15 +197,16 @@ static void DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/* Here we are dealing with text subtitles */ /* Here we are dealing with text subtitles */
p_vout = vlc_object_find( p_dec, VLC_OBJECT_VOUT, FIND_ANYWHERE ); p_vout = vlc_object_find( p_dec, VLC_OBJECT_VOUT, FIND_ANYWHERE );
if( !p_vout ) if( p_vout )
{
ParseText( p_dec, *pp_block, p_vout );
vlc_object_release( p_vout );
}
else
{ {
msg_Warn( p_dec, "couldn't find a video output, trashing subtitle" ); msg_Warn( p_dec, "couldn't find a video output, trashing subtitle" );
return;
} }
ParseText( p_dec, *pp_block, p_vout );
vlc_object_release( p_vout );
block_Release( *pp_block ); block_Release( *pp_block );
*pp_block = NULL; *pp_block = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment