summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c4
1 files changed, 1 insertions, 3 deletions
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;