diff options
author | wm4 <wm4@nowhere> | 2015-08-19 21:33:18 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-19 21:33:18 +0200 |
commit | bffd78748fb7fb1248424b1d4d2d67eb31c8762f (patch) | |
tree | 92e1038645675c95d6fffb85b3a78ee5c299ee24 /video/decode/dxva2.c | |
parent | cab1f6439c201d877e709c45bb6a119feddc6a53 (diff) | |
download | mpv-bffd78748fb7fb1248424b1d4d2d67eb31c8762f.tar.bz2 mpv-bffd78748fb7fb1248424b1d4d2d67eb31c8762f.tar.xz |
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.
Diffstat (limited to 'video/decode/dxva2.c')
-rw-r--r-- | video/decode/dxva2.c | 7 |
1 files changed, 2 insertions, 5 deletions
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; |