From bffd78748fb7fb1248424b1d4d2d67eb31c8762f Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 19 Aug 2015 21:33:18 +0200 Subject: vd_lavc: remove unneeded hwdec parameters All hwdec backends now use a single pixel format, and the format is always checked. Also, the init_decoder callback is now mandatory. --- video/decode/dxva2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'video/decode/dxva2.c') diff --git a/video/decode/dxva2.c b/video/decode/dxva2.c index c87093812c..5e06f505ac 100644 --- a/video/decode/dxva2.c +++ b/video/decode/dxva2.c @@ -205,14 +205,11 @@ static void dxva2_release_img(void *ptr) av_free(w); } -static struct mp_image *dxva2_allocate_image(struct lavc_ctx *s, int fmt, +static struct mp_image *dxva2_allocate_image(struct lavc_ctx *s, int img_w, int img_h) { DXVA2Context *ctx = s->hwdec_priv; - if (fmt != IMGFMT_DXVA2) - return NULL; - int i, old_unused = -1; for (i = 0; i < ctx->num_surfaces; i++) { surface_info *info = &ctx->surface_infos[i]; @@ -652,7 +649,7 @@ fail: return -1; } -static int dxva2_init_decoder(struct lavc_ctx *s, int fmt, int w, int h) +static int dxva2_init_decoder(struct lavc_ctx *s, int w, int h) { DXVA2Context *ctx = s->hwdec_priv; -- cgit v1.2.3