[FFmpeg-cvslog] avformat/av1: zero initialize the seq_params struct
James Almer
git at videolan.org
Mon Sep 3 05:34:16 EEST 2018
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Sep 2 23:27:51 2018 -0300| [11cec348291d32bd1375d9833d60928de3cf2cbb] | committer: James Almer
avformat/av1: zero initialize the seq_params struct
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11cec348291d32bd1375d9833d60928de3cf2cbb
---
libavformat/av1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/av1.c b/libavformat/av1.c
index aa11bde573..a0aad436a6 100644
--- a/libavformat/av1.c
+++ b/libavformat/av1.c
@@ -111,8 +111,6 @@ static int parse_color_config(AV1SequenceParameters *seq_params, GetBitContext *
seq_params->high_bitdepth = get_bits1(gb);
if (seq_params->seq_profile == FF_PROFILE_AV1_PROFESSIONAL && seq_params->high_bitdepth)
seq_params->twelve_bit = get_bits1(gb);
- else
- seq_params->twelve_bit = 0;
if (seq_params->seq_profile == FF_PROFILE_AV1_HIGH)
seq_params->monochrome = 0;
@@ -185,6 +183,8 @@ static int parse_sequence_header(AV1SequenceParameters *seq_params, const uint8_
if (ret < 0)
return ret;
+ memset(seq_params, 0, sizeof(*seq_params));
+
seq_params->seq_profile = get_bits(&gb, 3);
skip_bits1(&gb); // still_picture
More information about the ffmpeg-cvslog
mailing list