1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

avcodec/libjxldec: fix leaked EXIF ifd

We're missing a call to av_exif_free here. We leak the internal heap-
allocated objects when &ifd goes out of scope.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
This commit is contained in:
Leo Izen
2025-08-27 05:26:03 -04:00
parent c2d17c4db8
commit a8d6b87a44

View File

@@ -519,6 +519,7 @@ static int libjxl_receive_frame(AVCodecContext *avctx, AVFrame *frame)
ret = ff_decode_exif_attach_ifd(avctx, ctx->frame, &ifd);
if (ret < 0)
av_log(avctx, AV_LOG_ERROR, "Unable to attach EXIF ifd\n");
av_exif_free(&ifd);
}
if (ctx->basic_info.have_animation) {
ctx->frame->pts = av_rescale_q(ctx->accumulated_pts, ctx->anim_timebase, avctx->pkt_timebase);