PR #23751 opened by Zhao Zhili (quink)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23751
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23751.patch

# Summary of changes

The operator order is incorrect.

<!--
If this PR requires new FATE test samples, attach them to the PR and
list their target paths below (relative to the fate-suite root).

Attached filenames must match the sample's filename:

```fate-samples
# e.g. vorbis/new-sample.ogg
```
-->



>From a6923a5ae3aafde08abd2578c3a686be264c0144 Mon Sep 17 00:00:00 2001
From: Zhao Zhili <[email protected]>
Date: Thu, 9 Jul 2026 20:51:07 +0800
Subject: [PATCH] libavutil/vulkan: fix elem_size computation in
 vulkan_export_to_cuda

---
 libavutil/hwcontext_vulkan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index fad35f9ad6..2de2de7e93 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -3875,7 +3875,7 @@ static int vulkan_export_to_cuda(AVHWFramesContext *hwfc,
     CudaFunctions *cu = cu_internal->cuda_dl;
     CUarray_format cufmt = desc->comp[0].depth > 8 ? 
CU_AD_FORMAT_UNSIGNED_INT16 :
                                                      
CU_AD_FORMAT_UNSIGNED_INT8;
-    const int elem_size = 1 + desc->comp[0].depth > 8;
+    const int elem_size = 1 + (desc->comp[0].depth > 8);
 
     dst_f = (AVVkFrame *)frame->data[0];
     dst_int = dst_f->internal;
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to