mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-12 19:18:44 +02:00
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@khirnov.net>
This commit is contained in:
parent
620822c0c5
commit
9c65325819
@ -1114,12 +1114,9 @@ int ff_vk_decode_init(AVCodecContext *avctx)
|
|||||||
s = &ctx->s;
|
s = &ctx->s;
|
||||||
vk = &ctx->s.vkfn;
|
vk = &ctx->s.vkfn;
|
||||||
|
|
||||||
s->frames_ref = av_buffer_ref(avctx->hw_frames_ctx);
|
err = ff_vk_init(s, avctx, NULL, avctx->hw_frames_ctx);
|
||||||
s->frames = (AVHWFramesContext *)s->frames_ref->data;
|
if (err < 0)
|
||||||
s->hwfc = s->frames->hwctx;
|
return err;
|
||||||
|
|
||||||
s->device = (AVHWDeviceContext *)s->frames->device_ref->data;
|
|
||||||
s->hwctx = s->device->hwctx;
|
|
||||||
|
|
||||||
profile = get_video_profile(ctx, avctx->codec_id);
|
profile = get_video_profile(ctx, avctx->codec_id);
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
@ -1127,10 +1124,6 @@ int ff_vk_decode_init(AVCodecContext *avctx)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ff_vk_load_props(s);
|
|
||||||
if (err < 0)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
/* Create queue context */
|
/* Create queue context */
|
||||||
vk_desc = get_codecdesc(avctx->codec_id);
|
vk_desc = get_codecdesc(avctx->codec_id);
|
||||||
err = ff_vk_video_qf_init(s, &ctx->qf,
|
err = ff_vk_video_qf_init(s, &ctx->qf,
|
||||||
|
Loading…
Reference in New Issue
Block a user