This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 37b9e0152ec338e90a7a3e4e81253f862925e831
Author:     Lynne <[email protected]>
AuthorDate: Tue Sep 22 02:42:01 2026 +0900
Commit:     Lynne <[email protected]>
CommitDate: Thu Sep 24 11:05:28 2026 +0900

    ffv1enc_vulkan: zero the packet padding
    
    The packet wraps the pooled readback buffer, so the bytes after the
    payload were whatever the previous frame left there, and at the worst
    case size the padding fell outside the buffer.
---
 libavcodec/ffv1enc_vulkan.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/ffv1enc_vulkan.c b/libavcodec/ffv1enc_vulkan.c
index 83b3a140de..2d61545de7 100644
--- a/libavcodec/ffv1enc_vulkan.c
+++ b/libavcodec/ffv1enc_vulkan.c
@@ -380,7 +380,7 @@ static int vulkan_encode_ffv1_submit_frame(AVCodecContext 
*avctx,
     RET(ff_vk_get_pooled_buffer(&fv->s, &fv->compacted_data_pool,
                                 &fd->compacted_data_ref,
                                 VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
-                                NULL, maxsize,
+                                NULL, maxsize + AV_INPUT_BUFFER_PADDING_SIZE,
                                 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
                                 fv->s.host_cached_flag));
     compacted_buf = fd->compacted_data_ref;
@@ -764,6 +764,8 @@ static int get_packet(AVCodecContext *avctx, 
FFVkExecContext *exec,
                                          1, &invalidate_data);
     }
 
+    memset(compacted_buf->mapped_mem + pkt->size, 0, 
AV_INPUT_BUFFER_PADDING_SIZE);
+
     /* Hand the gathered buffer to the packet with no copy: pkt->buf references
      * the pooled Vulkan buffer, returned to its pool when the packet is 
freed. */
     pkt->buf = av_buffer_create(compacted_buf->mapped_mem, compacted_buf->size,

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to