[FFmpeg-devel] [PATCH 5/5] avcodec/vulkan_decode: Factor creating session params out, fix leak

Lynne dev at lynne.ee
Fri Sep 15 03:05:54 EEST 2023


Sep 15, 2023, 01:45 by andreas.rheinhardt at outlook.com:

> All Vulkan HWAccels share the same boilerplate code for creating
> session params and this includes a common bug: In case actually
> creating the video session parameters fails, the buffer destined
> to hold them leaks; in case of HEVC this is also true if
> get_data_set_buf() fails.
>
> This commit factors this code out and fixes the leak.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  libavcodec/vulkan_av1.c    | 28 ++++------------------------
>  libavcodec/vulkan_decode.c | 31 ++++++++++++++++++++++++++++++-
>  libavcodec/vulkan_decode.h |  5 +++--
>  libavcodec/vulkan_h264.c   | 28 ++++------------------------
>  libavcodec/vulkan_hevc.c   | 27 +++------------------------
>  5 files changed, 44 insertions(+), 75 deletions(-)
>

Patchset tested and reviewed, LGTM.
Thanks.


More information about the ffmpeg-devel mailing list