mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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>
(cherry picked from commit 56b3726ed2
)
This commit is contained in:
parent
1eb8f6885e
commit
bb8d18a39b
@ -205,7 +205,7 @@ static int encode_sample_description(AVCodecContext *avctx)
|
|||||||
ASS * ass;
|
ASS * ass;
|
||||||
ASSStyle * style;
|
ASSStyle * style;
|
||||||
int i, j;
|
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;
|
uint16_t style_start, style_end, fontID, count;
|
||||||
int font_names_total_len = 0;
|
int font_names_total_len = 0;
|
||||||
MovTextContext *s = avctx->priv_data;
|
MovTextContext *s = avctx->priv_data;
|
||||||
|
Loading…
Reference in New Issue
Block a user