[FFmpeg-cvslog] avcodec/evc_frame_merge_bsf: free EVCFMergeContext on flush and close
James Almer
git at videolan.org
Sat Jun 17 16:10:10 EEST 2023
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Jun 15 11:14:07 2023 -0300| [f24064e6276bef326d708bef595f53bc747cb998] | committer: James Almer
avcodec/evc_frame_merge_bsf: free EVCFMergeContext on flush and close
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f24064e6276bef326d708bef595f53bc747cb998
---
libavcodec/evc_frame_merge_bsf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list