summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 6dda6302f3..581f50979b 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -399,7 +399,7 @@ static int hwdec_probe(struct dec_video *vd, struct vd_lavc_hwdec *hwdec,
r = hwdec->probe(ctx, hwdec, codec);
if (hwdec->generic_hwaccel) {
assert(!hwdec->probe && !hwdec->init && !hwdec->init_decoder &&
- !hwdec->uninit && !hwdec->allocate_image && !hwdec->process_image);
+ !hwdec->uninit && !hwdec->allocate_image);
struct mp_hwdec_ctx *dev = hwdec_create_dev(vd, hwdec, autoprobe);
if (!dev)
return hwdec->copying ? -1 : HWDEC_ERR_NO_CTX;
@@ -779,6 +779,9 @@ int hwdec_setup_hw_frames_ctx(struct lavc_ctx *ctx, AVBufferRef *device_ctx,
fctx->initial_pool_size = initial_pool_size;
+ if (ctx->hwdec->hwframes_refine)
+ ctx->hwdec->hwframes_refine(ctx, ctx->cached_hw_frames_ctx);
+
int res = av_hwframe_ctx_init(ctx->cached_hw_frames_ctx);
if (res < 0) {
MP_ERR(ctx, "Failed to allocate hw frames.\n");