Commit c245c80a authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

Check malloc return value and print error message when fourcc is not supported.

parent c9f8cdbb
......@@ -328,7 +328,7 @@ static void Close( vlc_object_t *p_this )
var_Destroy( p_this, DVBSUB_CFG_PREFIX "x" );
var_Destroy( p_this, DVBSUB_CFG_PREFIX "y" );
var_Destroy( p_this, DVBSUB_CFG_PREFIX "position" );
var_Destroy( p_this, DVBSUB_CFG_PREFIX "position" );
free_all( p_dec );
free( p_sys );
......@@ -1788,7 +1788,11 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_subpic )
if( !p_region ) return NULL;
if( p_region->fmt.i_chroma != VLC_FOURCC('T','E','X','T') &&
p_region->fmt.i_chroma != VLC_FOURCC('Y','U','V','P') ) return NULL;
p_region->fmt.i_chroma != VLC_FOURCC('Y','U','V','P') )
{
msg_Err( p_enc, "chroma not supported", p_region->fmt.i_chroma );
return NULL;
}
if( p_region->fmt.p_palette )
{
......
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