summaryrefslogtreecommitdiffstats
path: root/video/decode/vdpau.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/vdpau.c')
-rw-r--r--video/decode/vdpau.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/video/decode/vdpau.c b/video/decode/vdpau.c
index e20abdafca..e0d3241803 100644
--- a/video/decode/vdpau.c
+++ b/video/decode/vdpau.c
@@ -157,17 +157,14 @@ fail:
return false;
}
-static struct mp_image *allocate_image(struct lavc_ctx *ctx, AVFrame *frame)
+static struct mp_image *allocate_image(struct lavc_ctx *ctx, int fmt,
+ int w, int h)
{
struct priv *p = ctx->hwdec_priv;
- if (frame->format != AV_PIX_FMT_VDPAU)
+ if (fmt != IMGFMT_VDPAU)
return NULL;
- // frame->width/height lie. Using them breaks with non-mod 16 video.
- int w = ctx->avctx->width;
- int h = ctx->avctx->height;
-
handle_preemption(ctx);
if (w != p->vid_width || h != p->vid_height ||