From 8b3dbab19eafee2da3685bb0a8550db448fad757 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 2 Dec 2017 02:45:49 +0100 Subject: vd_lavc: simpler way to check for opque hw frame The ->fmt shit is something I'd like to phase out. --- video/decode/vd_lavc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'video') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index b9732c1fc0..5e9b30d453 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -1091,9 +1091,7 @@ static bool receive_frame(struct dec_video *vd, struct mp_image **out_image) if (!res) return progress; - if (ctx->use_hwdec && ctx->hwdec.copying && - (res->fmt.flags & MP_IMGFLAG_HWACCEL)) - { + if (ctx->use_hwdec && ctx->hwdec.copying && res->hwctx) { struct mp_image *sw = mp_image_hw_download(res, ctx->hwdec_swpool); mp_image_unrefp(&res); res = sw; -- cgit v1.2.3