[FFmpeg-cvslog] avcodec/evc_parse: zero sps, pps and sh structs
James Almer
git at videolan.org
Sat Jun 17 16:09:58 EEST 2023
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Jun 15 10:33:25 2023 -0300| [57879b23bc77013ac6832d19b62203975718f557] | committer: James Almer
avcodec/evc_parse: zero sps, pps and sh structs
Otherwise stale values may remain in place.
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57879b23bc77013ac6832d19b62203975718f557
---
libavcodec/evc_parse.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/evc_parse.c b/libavcodec/evc_parse.c
index c8d3c921c8..6ecfbccfde 100644
--- a/libavcodec/evc_parse.c
+++ b/libavcodec/evc_parse.c
@@ -200,6 +200,8 @@ EVCParserSPS *ff_evc_parse_sps(EVCParserContext *ctx, const uint8_t *bs, int bs_
}
sps = ctx->sps[sps_seq_parameter_set_id];
+ memset(sps, 0, sizeof(*sps));
+
sps->sps_seq_parameter_set_id = sps_seq_parameter_set_id;
// the Baseline profile is indicated by profile_idc eqal to 0
@@ -360,6 +362,7 @@ EVCParserPPS *ff_evc_parse_pps(EVCParserContext *ctx, const uint8_t *bs, int bs_
}
pps = ctx->pps[pps_pic_parameter_set_id];
+ memset(pps, 0, sizeof(*pps));
pps->pps_pic_parameter_set_id = pps_pic_parameter_set_id;
@@ -440,6 +443,7 @@ EVCParserSliceHeader *ff_evc_parse_slice_header(EVCParserContext *ctx, const uin
}
sh = ctx->slice_header[slice_pic_parameter_set_id];
+ memset(sh, 0, sizeof(*sh));
pps = ctx->pps[slice_pic_parameter_set_id];
if(!pps)
More information about the ffmpeg-cvslog
mailing list