[FFmpeg-devel] [PATCH] vulkan_encode_h264/5: Fix uninitialized return value in write_extra_headers

David Rosca nowrep at gmail.com
Mon Jul 28 18:13:32 EEST 2025


On Thu, Nov 14, 2024 at 10:39 PM David Rosca <nowrep at gmail.com> wrote:
>
> ---
>  libavcodec/vulkan_encode_h264.c | 1 +
>  libavcodec/vulkan_encode_h265.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/libavcodec/vulkan_encode_h264.c b/libavcodec/vulkan_encode_h264.c
> index cdc87fb4ca..fdd3cc8a55 100644
> --- a/libavcodec/vulkan_encode_h264.c
> +++ b/libavcodec/vulkan_encode_h264.c
> @@ -1311,6 +1311,7 @@ static int write_extra_headers(AVCodecContext *avctx,
>          if (err < 0)
>              goto fail;
>      } else {
> +        err = 0;
>          *data_len = 0;
>      }
>
> diff --git a/libavcodec/vulkan_encode_h265.c b/libavcodec/vulkan_encode_h265.c
> index cd50f2f756..8c25cacded 100644
> --- a/libavcodec/vulkan_encode_h265.c
> +++ b/libavcodec/vulkan_encode_h265.c
> @@ -1471,6 +1471,7 @@ static int write_extra_headers(AVCodecContext *avctx,
>          if (err < 0)
>              goto fail;
>      } else {
> +        err = 0;
>          *data_len = 0;
>      }
>
> --
> 2.47.0
>

Ping, this causes random fails in release builds.

David


More information about the ffmpeg-devel mailing list