summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index a7b05c8a35..fd4bf59092 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -945,8 +945,11 @@ static void handle_err(struct dec_video *vd)
if (ctx->hwdec) {
ctx->hwdec_fail_count += 1;
// The FFmpeg VT hwaccel is buggy and can crash after 1 broken frame.
- bool vt = ctx->hwdec && ctx->hwdec->type == HWDEC_VIDEOTOOLBOX;
- if (ctx->hwdec_fail_count >= opts->software_fallback || vt)
+ bool force = false;
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 82, 101)
+ force |= ctx->hwdec && ctx->hwdec->type == HWDEC_VIDEOTOOLBOX;
+#endif
+ if (ctx->hwdec_fail_count >= opts->software_fallback || force)
ctx->hwdec_failed = true;
}
}