diff options
Diffstat (limited to 'video/decode/vdpau_old.c')
-rw-r--r-- | video/decode/vdpau_old.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/video/decode/vdpau_old.c b/video/decode/vdpau_old.c index 4abdafa9c0..b5674dcec0 100644 --- a/video/decode/vdpau_old.c +++ b/video/decode/vdpau_old.c @@ -162,18 +162,14 @@ static void release_surface(void *ptr) talloc_free(state); } -static struct mp_image *allocate_image(struct lavc_ctx *ctx, AVFrame *frame) +static struct mp_image *allocate_image(struct lavc_ctx *ctx, int imgfmt, + int w, int h) { struct priv *p = ctx->hwdec_priv; - int imgfmt = pixfmt2imgfmt(frame->format); if (!IMGFMT_IS_VDPAU(imgfmt)) return NULL; - // frame->width/height lie. Using them breaks with non-mod 16 video. - int w = ctx->avctx->width; - int h = ctx->avctx->height; - if (w != p->vid_width || h != p->vid_height || imgfmt != p->image_format) { p->vid_width = w; p->vid_height = h; |