mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
vulkan: fix using encode caps before querying
Fix using enc_caps.supportedEncodeFeedbackFlags before
calling vkGetPhysicalDeviceVideoCapabilitiesKHR().
Otherwise the check will never pass and will fail with ENOTSUP.
Fixes 3f9e04b
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
committed by
Lynne
co-authored by
Lynne
parent
6b3e0f903e
commit
d01d18ad71
@@ -772,14 +772,6 @@ av_cold int ff_vulkan_encode_init(AVCodecContext *avctx, FFVulkanEncodeContext *
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
if ((ctx->enc_caps.supportedEncodeFeedbackFlags & feedback_flags) !=
|
||||
feedback_flags) {
|
||||
av_log (avctx, AV_LOG_ERROR,
|
||||
"Driver does not support required encode feedback flags "
|
||||
"(BUFFER_OFFSET and BYTES_WRITTEN).\n");
|
||||
return AVERROR(ENOTSUP);
|
||||
}
|
||||
|
||||
ctx->base.op = &vulkan_base_encode_ops;
|
||||
ctx->codec = codec;
|
||||
|
||||
@@ -881,6 +873,14 @@ av_cold int ff_vulkan_encode_init(AVCodecContext *avctx, FFVulkanEncodeContext *
|
||||
return AVERROR_EXTERNAL;
|
||||
}
|
||||
|
||||
if ((ctx->enc_caps.supportedEncodeFeedbackFlags & feedback_flags) !=
|
||||
feedback_flags) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Driver does not support required encode feedback flags "
|
||||
"(BUFFER_OFFSET and BYTES_WRITTEN).\n");
|
||||
return AVERROR(ENOTSUP);
|
||||
}
|
||||
|
||||
err = init_rc(avctx, ctx);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user