From 0afd121ae67a60d033fc8f74ec28bbb8b84f031d Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 4 Dec 2013 20:58:06 +0100 Subject: vd_lavc: don't check required hwdec fields --- video/decode/vd_lavc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index fadd76de0e..b48dc7fce7 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -403,13 +403,12 @@ static void init_avctx(struct dec_video *vd, const char *decoder, ctx->pic = avcodec_alloc_frame(); #endif - if (ctx->hwdec && ctx->hwdec->allocate_image) { + if (ctx->hwdec) { ctx->do_hw_dr1 = true; avctx->thread_count = 1; - if (ctx->hwdec->image_formats) - avctx->get_format = get_format_hwdec; + avctx->get_format = get_format_hwdec; setup_refcounting_hw(avctx); - if (ctx->hwdec->init && ctx->hwdec->init(ctx) < 0) { + if (ctx->hwdec->init(ctx) < 0) { uninit_avctx(vd); return; } -- cgit v1.2.3