avcodec/movtextenc: Fix potential use of uninitialized value
Background colour was never initialized if no style was available. Use a sane default of zero (i.e. completely transparent). Fixes Coverity issue #1461471. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
@@ -205,7 +205,7 @@ static int encode_sample_description(AVCodecContext *avctx)
|
||||
ASS *ass;
|
||||
ASSStyle *style;
|
||||
int i, j;
|
||||
uint32_t tsmb_size, tsmb_type, back_color, style_color;
|
||||
uint32_t tsmb_size, tsmb_type, back_color = 0, style_color;
|
||||
uint16_t style_start, style_end, fontID, count;
|
||||
int font_names_total_len = 0;
|
||||
MovTextContext *s = avctx->priv_data;
|
||||
|
Reference in New Issue
Block a user