summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/decode/vd_lavc.c7
1 files 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;
}