diff options
author | wm4 <wm4@nowhere> | 2017-03-07 12:20:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-03-07 12:20:04 +0100 |
commit | 2912210da18e84620635ecdfde75361fa300f675 (patch) | |
tree | e7c0eb599daa0c8bc7e7b7407a32c909f2506472 /video | |
parent | 7eb32240c9f4fd399d59b4496a0cad313f0b75ed (diff) | |
download | mpv-2912210da18e84620635ecdfde75361fa300f675.tar.bz2 mpv-2912210da18e84620635ecdfde75361fa300f675.tar.xz |
vd_lavc: disable videotoolbox hack with newer ffmpeg versions
The hack becomes unnecessary with newer versions, but it's still needed
for older ones.
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/vd_lavc.c | 7 |
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; } } |