Commit 1829bf2e authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* backport [19098]

 
  Fixed a memleak per packetizer module_Need in flac.c
parent ac81d6fa
......@@ -254,9 +254,10 @@ static int OpenDecoder( vlc_object_t *p_this )
static int OpenPacketizer( vlc_object_t *p_this )
{
decoder_t *p_dec = (decoder_t*)p_this;
es_format_t es_save = p_dec->fmt_out;
int i_ret;
/* Hmmm, mem leak ?*/
/* */
es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
i_ret = OpenDecoder( p_this );
......@@ -264,8 +265,11 @@ static int OpenPacketizer( vlc_object_t *p_this )
/* Set output properties */
p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','a','c');
if( i_ret != VLC_SUCCESS ) return i_ret;
if( i_ret != VLC_SUCCESS )
{
es_format_Clean( &p_dec->fmt_out );
p_dec->fmt_out = es_save;
}
return i_ret;
}
......
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