[FFmpeg-cvslog] avcodec/vulkan_encode_h264: Fix memleak on error
Andreas Rheinhardt
git at videolan.org
Thu May 15 03:03:03 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon May 5 21:14:32 2025 +0200| [70fa44dfa84acec6bfa94dead95e133d7fd7cd24] | committer: Andreas Rheinhardt
avcodec/vulkan_encode_h264: Fix memleak on error
Reviewed-by: Lynne <dev at lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70fa44dfa84acec6bfa94dead95e133d7fd7cd24
---
libavcodec/vulkan_encode_h264.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vulkan_encode_h264.c b/libavcodec/vulkan_encode_h264.c
index ecbb125420..f31b6d4069 100644
--- a/libavcodec/vulkan_encode_h264.c
+++ b/libavcodec/vulkan_encode_h264.c
@@ -1065,7 +1065,7 @@ static int parse_feedback_units(AVCodecContext *avctx,
if (err < 0) {
av_log(avctx, AV_LOG_ERROR, "Unable to parse feedback units, bad drivers: %s\n",
av_err2str(err));
- return err;
+ goto fail;
}
/* If PPS has an override, just copy it entirely. */
@@ -1079,10 +1079,12 @@ static int parse_feedback_units(AVCodecContext *avctx,
}
}
+ err = 0;
+fail:
ff_cbs_fragment_free(&au);
ff_cbs_close(&cbs);
- return 0;
+ return err;
}
static int init_base_units(AVCodecContext *avctx)
More information about the ffmpeg-cvslog
mailing list