From 55c7e968785dce4731b3faf94706a1a19bf6df2f Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 1 Dec 2017 22:08:59 +0100 Subject: vd_lavc: fix dumb nonsense --- video/decode/vd_lavc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'video') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index b0b3cd9208..ee11b21f15 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -154,6 +154,7 @@ typedef struct lavc_ctx { enum AVDiscard skip_frame; bool flushing; const char *decoder; + bool hwdec_requested; bool hwdec_failed; bool hwdec_notified; @@ -431,6 +432,8 @@ static void select_and_set_hwdec(struct dec_video *vd) int num_hwdecs = 0; add_all_hwdec_methods(&hwdecs, &num_hwdecs); + ctx->hwdec_requested = true; + for (int n = 0; n < num_hwdecs; n++) { struct hwdec_info *hwdec = &hwdecs[n]; @@ -1101,7 +1104,7 @@ static bool receive_frame(struct dec_video *vd, struct mp_image **out_image) } } - if (!ctx->hwdec_notified && vd->opts->hwdec_api != HWDEC_NONE) { + if (!ctx->hwdec_notified && ctx->hwdec_requested) { if (ctx->use_hwdec) { MP_INFO(vd, "Using hardware decoding (%s).\n", ctx->hwdec.method_name); -- cgit v1.2.3