diff options
author | wm4 <wm4@nowhere> | 2015-11-03 14:03:02 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-03 14:03:02 +0100 |
commit | 163c6ad862c1bffcec34eb09e03d09c133b15d92 (patch) | |
tree | 254dce347f7f2ebe5cb0cf2671ae2f3d67b5aaf0 /video/decode/lavc.h | |
parent | 4058b418bf3618c5d9b01e08e31774ae115d2365 (diff) | |
download | mpv-163c6ad862c1bffcec34eb09e03d09c133b15d92.tar.bz2 mpv-163c6ad862c1bffcec34eb09e03d09c133b15d92.tar.xz |
vd_lavc: make hwdec fallback more tolerant
A hw decoder might fail to decode a frame for multiple reasons, and not
always just because decoding is impossible. We can't generally
distinguish these reasons well. Make it more tolerant by accepting
failures of 3 frames, but not more. The threshold can be adjusted by the
repurposed --vd-lavc-software-fallback option.
(This behavior was suggested much earlier in some PR, but at the time
the "proper" hwdec fallback was indistinguishable from decoding error.
With the current situation, "proper" fallback is still instantious.)
Diffstat (limited to 'video/decode/lavc.h')
-rw-r--r-- | video/decode/lavc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/decode/lavc.h b/video/decode/lavc.h index 90b2d6a886..b655b8480b 100644 --- a/video/decode/lavc.h +++ b/video/decode/lavc.h @@ -34,6 +34,7 @@ typedef struct lavc_ctx { int hwdec_profile; bool hwdec_request_reinit; + int hwdec_fail_count; } vd_ffmpeg_ctx; struct vd_lavc_hwdec { |