[FFmpeg-cvslog] vulkan_decode: use ff_vk_init
Lynne
git at videolan.org
Mon Sep 9 08:10:05 EEST 2024
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Sun Sep 1 02:36:10 2024 +0000| [9c65325819867603502b3c8bc3a8fa811e78595e] | committer: Lynne
vulkan_decode: use ff_vk_init
This solves the issue of an av_log function being called
with a context with invalid class.
Co-authored-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9c65325819867603502b3c8bc3a8fa811e78595e
---
libavcodec/vulkan_decode.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index 35966cd60d..f6b8866ff5 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -1114,12 +1114,9 @@ int ff_vk_decode_init(AVCodecContext *avctx)
s = &ctx->s;
vk = &ctx->s.vkfn;
- s->frames_ref = av_buffer_ref(avctx->hw_frames_ctx);
- s->frames = (AVHWFramesContext *)s->frames_ref->data;
- s->hwfc = s->frames->hwctx;
-
- s->device = (AVHWDeviceContext *)s->frames->device_ref->data;
- s->hwctx = s->device->hwctx;
+ err = ff_vk_init(s, avctx, NULL, avctx->hw_frames_ctx);
+ if (err < 0)
+ return err;
profile = get_video_profile(ctx, avctx->codec_id);
if (!profile) {
@@ -1127,10 +1124,6 @@ int ff_vk_decode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
- err = ff_vk_load_props(s);
- if (err < 0)
- goto fail;
-
/* Create queue context */
vk_desc = get_codecdesc(avctx->codec_id);
err = ff_vk_video_qf_init(s, &ctx->qf,
More information about the ffmpeg-cvslog
mailing list