aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/evc_parse.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-06-15 11:13:48 -0300
committerJames Almer <jamrial@gmail.com>2023-06-17 10:08:54 -0300
commit9fc1d9adc8d05056ea53522c34ae4953ccdb7c59 (patch)
tree8293d5d2638c83beb5d27ac08276aa1c668ba286 /libavcodec/evc_parse.c
parent46a9be01b8c200636fb3ebbe43f209ae27b26dbc (diff)
downloadffmpeg-9fc1d9adc8d05056ea53522c34ae4953ccdb7c59.tar.gz
avcodec/evc_parse: make freeing EVCParserContext buffers a shared function
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/evc_parse.c')
-rw-r--r--libavcodec/evc_parse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/evc_parse.c b/libavcodec/evc_parse.c
index 1d8757b231..44be5c5291 100644
--- a/libavcodec/evc_parse.c
+++ b/libavcodec/evc_parse.c
@@ -765,3 +765,10 @@ int ff_evc_parse_nal_unit(EVCParserContext *ctx, const uint8_t *buf, int buf_siz
return 0;
}
+void ff_evc_parse_free(EVCParserContext *ctx) {
+ for (int i = 0; i < EVC_MAX_SPS_COUNT; i++)
+ av_freep(&ctx->sps[i]);
+
+ for (int i = 0; i < EVC_MAX_PPS_COUNT; i++)
+ av_freep(&ctx->pps[i]);
+}