mirror of
https://github.com/mpv-player/mpv
synced 2025-01-14 02:51:26 +00:00
vd_lavc: always fail decoding immediately if copying hw surface fails
Successful decoding of a frame resets ctx->hwdec_fail_count to 0 - which us ok, but prevents fallback if it fails if --vd-lavc-software-fallback is set to something higher than 1. Just fail it immediately, since failing here always indicates some real error (or OOM), not e.g. a video parsing error or such, which we try to tolerate via the error counter.
This commit is contained in:
parent
ff9f2c4b6e
commit
9d69eae162
@ -982,6 +982,7 @@ static bool receive_frame(struct dec_video *vd, struct mp_image **out_image)
|
||||
res = sw;
|
||||
if (!res) {
|
||||
MP_ERR(vd, "Could not copy back hardware decoded frame.\n");
|
||||
ctx->hwdec_fail_count = INT_MAX - 1; // force fallback
|
||||
handle_err(vd);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user