[FFmpeg-devel] [PATCH 02/11] avcodec/evc_parser: remove superfluous memset calls
James Almer
jamrial at gmail.com
Thu Jun 15 18:18:26 EEST 2023
The entire EVCParserContext will be zeroed during allocation.
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/evc_parser.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/libavcodec/evc_parser.c b/libavcodec/evc_parser.c
index 7528fb13db..639dcbd135 100644
--- a/libavcodec/evc_parser.c
+++ b/libavcodec/evc_parser.c
@@ -197,17 +197,6 @@ static int evc_parse(AVCodecParserContext *s, AVCodecContext *avctx,
return next;
}
-static int evc_parser_init(AVCodecParserContext *s)
-{
- EVCParserContext *ctx = s->priv_data;
-
- memset(ctx->sps, 0, sizeof(EVCParserSPS *)*EVC_MAX_SPS_COUNT);
- memset(ctx->pps, 0, sizeof(EVCParserPPS *)*EVC_MAX_PPS_COUNT);
- memset(ctx->slice_header, 0, sizeof(EVCParserSliceHeader *)*EVC_MAX_PPS_COUNT);
-
- return 0;
-}
-
static void evc_parser_close(AVCodecParserContext *s)
{
EVCParserContext *ctx = s->priv_data;
@@ -229,7 +218,6 @@ static void evc_parser_close(AVCodecParserContext *s)
const AVCodecParser ff_evc_parser = {
.codec_ids = { AV_CODEC_ID_EVC },
.priv_data_size = sizeof(EVCParserContext),
- .parser_init = evc_parser_init,
.parser_parse = evc_parse,
.parser_close = evc_parser_close,
};
--
2.41.0
More information about the ffmpeg-devel
mailing list