Commit ddea6f6c authored by François Cartegnie's avatar François Cartegnie 🤞

codec: spudec: fix unsized region regression (fix #17757)

parent 56a969a8
......@@ -710,10 +710,10 @@ static void Render( decoder_t *p_dec, subpicture_t *p_spu,
}
p_spu->p_region = subpicture_region_New( &fmt );
fmt.p_palette = NULL;
video_format_Clean( &fmt );
if( !p_spu->p_region )
{
fmt.p_palette = NULL;
video_format_Clean( &fmt );
msg_Err( p_dec, "cannot allocate SPU region" );
return;
}
......@@ -735,4 +735,7 @@ static void Render( decoder_t *p_dec, subpicture_t *p_spu,
memset( p_p + i_x + i_y, i_color, i_len );
}
}
fmt.p_palette = NULL;
video_format_Clean( &fmt );
}
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