Commit f6d81f1525 for ffmpeg
commit f6d81f1525e8d7b3eae39296dc206730aaf322fa
Author: Marcos Ashton Iglesias <marcosashiglesias@gmail.com>
Date: Sat Oct 24 15:25:20 2026 +0100
avcodec/vulkan_decode: fix the allow_profile_mismatch fallback
It tested avctx->flags instead of avctx->hwaccel_flags and missed
VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR, so -hwaccel_flags
allow_profile_mismatch had no effect.
diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index 5cf338b0d3..ddaba355ef 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -893,8 +893,9 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_
caps,
dec_caps,
cur_profile);
- if (ret == VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR &&
- avctx->flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH &&
+ if ((ret == VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR ||
+ ret == VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR) &&
+ avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH &&
avctx->profile != base_profile) {
av_log(avctx, AV_LOG_VERBOSE, "%s profile %s not supported, attempting "
"again with profile %s\n",