diff options
author | wm4 <wm4@nowhere> | 2017-12-01 22:08:59 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-12-01 22:08:59 +0100 |
commit | 55c7e968785dce4731b3faf94706a1a19bf6df2f (patch) | |
tree | 5b1f433eec408447df85c4cb2e2a531c86dd06f9 /video/decode | |
parent | 9d367cb0f9780a9d53f410dd11a23ca4cfec5e2f (diff) | |
download | mpv-55c7e968785dce4731b3faf94706a1a19bf6df2f.tar.bz2 mpv-55c7e968785dce4731b3faf94706a1a19bf6df2f.tar.xz |
vd_lavc: fix dumb nonsense
Diffstat (limited to 'video/decode')
-rw-r--r-- | video/decode/vd_lavc.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |