Commit 969da8f5 authored by Thomas Guillem's avatar Thomas Guillem

transcode: fix null-deref in some error cases

Null-deref could happen when flushing (p_buffer == NULL).
parent cb1b1634
......@@ -590,9 +590,8 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
{
if( id->id )
return sout_StreamIdSend( p_stream->p_next, id->id, p_buffer );
block_Release( p_buffer );
return VLC_EGENERIC;
else
goto error;
}
switch( id->p_decoder->fmt_in.i_cat )
......@@ -622,12 +621,14 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
break;
default:
p_out = NULL;
block_Release( p_buffer );
break;
goto error;
}
if( p_out )
return sout_StreamIdSend( p_stream->p_next, id->id, p_out );
return VLC_SUCCESS;
error:
if( p_buffer )
block_Release( p_buffer );
return VLC_EGENERIC;
}
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