Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Fix encode feedback flags check running before capabilities are queried

The feedback flags check added in 735c84b57f was placed before
GetPhysicalDeviceVideoCapabilitiesKHR populates enc_caps, so
supportedEncodeFeedbackFlags is always zero and the check always fails.

Move the check to after the capabilities query where enc_caps is valid.

diff --git a/libavcodec/vulkan_encode.c b/libavcodec/vulkan_encode.c
--- a/libavcodec/vulkan_encode.c
+++ b/libavcodec/vulkan_encode.c
@@ -773,14 +773,6 @@
return AVERROR(EINVAL);
}

Check failure on line 15 in patches/FFmpeg/FFmpeg/vulkan/02-fix-encode-feedback-flags-check-order.patch

View workflow job for this annotation

GitHub Actions / Common Lint / Common Lint

Trailing Whitespace

patches/FFmpeg/FFmpeg/vulkan/02-fix-encode-feedback-flags-check-order.patch:15: Trailing whitespace at end of line.
- 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;

Check failure on line 26 in patches/FFmpeg/FFmpeg/vulkan/02-fix-encode-feedback-flags-check-order.patch

View workflow job for this annotation

GitHub Actions / Common Lint / Common Lint

Trailing Whitespace

patches/FFmpeg/FFmpeg/vulkan/02-fix-encode-feedback-flags-check-order.patch:26: Trailing whitespace at end of line.
@@ -880,6 +872,14 @@
return AVERROR_EXTERNAL;
}

Check failure on line 30 in patches/FFmpeg/FFmpeg/vulkan/02-fix-encode-feedback-flags-check-order.patch

View workflow job for this annotation

GitHub Actions / Common Lint / Common Lint

Trailing Whitespace

patches/FFmpeg/FFmpeg/vulkan/02-fix-encode-feedback-flags-check-order.patch:30: Trailing whitespace at end of line.
+ 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;
Loading