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

David Rosca nowrep at gmail.com
Thu Nov 14 23:38:08 EET 2024


---
 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



More information about the ffmpeg-devel mailing list