aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-06-15 11:14:07 -0300
committerJames Almer <jamrial@gmail.com>2023-06-17 10:08:54 -0300
commitf24064e6276bef326d708bef595f53bc747cb998 (patch)
tree892a7b475c78280b1836d81f3c8e1051ffaad887
parentb1d0b59d81bc36e333572d36f878fc6735be63ad (diff)
downloadffmpeg-f24064e6276bef326d708bef595f53bc747cb998.tar.gz
avcodec/evc_frame_merge_bsf: free EVCFMergeContext on flush and close
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/evc_frame_merge_bsf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/evc_frame_merge_bsf.c b/libavcodec/evc_frame_merge_bsf.c
index fbb344490a..7cc701f5c5 100644
--- a/libavcodec/evc_frame_merge_bsf.c
+++ b/libavcodec/evc_frame_merge_bsf.c
@@ -60,6 +60,7 @@ static void evc_frame_merge_flush(AVBSFContext *bsf)
{
EVCFMergeContext *ctx = bsf->priv_data;
+ ff_evc_parse_free(&ctx->parser_ctx);
av_packet_unref(ctx->in);
ctx->au_buffer.data_size = 0;
}
@@ -129,7 +130,7 @@ static int evc_frame_merge_filter(AVBSFContext *bsf, AVPacket *out)
err = AVERROR(EAGAIN);
if (err < 0 && err != AVERROR(EAGAIN))
- evc_frame_merge_flush(bsf);
+ ctx->au_buffer.data_size = 0;
return err;
}
@@ -154,6 +155,7 @@ static void evc_frame_merge_close(AVBSFContext *bsf)
EVCFMergeContext *ctx = bsf->priv_data;
av_packet_free(&ctx->in);
+ ff_evc_parse_free(&ctx->parser_ctx);
ctx->au_buffer.capacity = 0;
av_freep(&ctx->au_buffer.data);