[FFmpeg-cvslog] avcodec/evc_parser: remove superfluous memset calls

James Almer git at videolan.org
Fri Jun 16 16:09:29 EEST 2023


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Jun 15 10:02:43 2023 -0300| [d00f0eebbdebdf03698e8e134c3765f3ccb2f8c7] | committer: James Almer

avcodec/evc_parser: remove superfluous memset calls

The entire EVCParserContext will be zeroed during allocation.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d00f0eebbdebdf03698e8e134c3765f3ccb2f8c7
---

 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,
 };



More information about the ffmpeg-cvslog mailing list