[FFmpeg-cvslog] avcodec/vulkan_decode: Remove always-false check

Andreas Rheinhardt git at videolan.org
Thu Mar 7 10:01:35 EET 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Mar  3 12:48:17 2024 +0100| [ccb432c1fe651e64d1ae6ca02f5d2ad0e966c311] | committer: Andreas Rheinhardt

avcodec/vulkan_decode: Remove always-false check

These fields are set for all Vulkan decoding hwaccels;
they would be useless if it were different.

Reviewed-by: Lynne <dev at lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ccb432c1fe651e64d1ae6ca02f5d2ad0e966c311
---

 libavcodec/vulkan_decode.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index 233b5792d8..91929d165f 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -780,11 +780,7 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_
     VkVideoFormatPropertiesKHR *ret_info;
     uint32_t nb_out_fmts = 0;
 
-    if (!vk_desc->decode_op || !vk_desc->decode_extension) {
-        av_log(avctx, AV_LOG_ERROR, "Unsupported codec for Vulkan decoding: %s!\n",
-               avcodec_get_name(avctx->codec_id));
-        return AVERROR(ENOSYS);
-    } else if (!(vk_desc->decode_extension & ctx->s.extensions)) {
+    if (!(vk_desc->decode_extension & ctx->s.extensions)) {
         av_log(avctx, AV_LOG_ERROR, "Device does not support decoding %s!\n",
                avcodec_get_name(avctx->codec_id));
         return AVERROR(ENOSYS);



More information about the ffmpeg-cvslog mailing list