mirror of https://github.com/mpv-player/mpv
vd_lavc: repeatedly attempt to fallback if hwdec fails in reinit
In the same way that fallback in receive_frame() needs to be repeated until we get a working decoder, we have to do the same thing in reinit(). Calling force_fallback() only once can still yield a non functional decoder. The reason why we have these multiple paths which each require their own fallback logic is that we can fail at different stages: * hwdec init * decoder init <- repeated fallback was missing here * frame decoding Fixes #12084
This commit is contained in:
parent
6729285502
commit
e8144ac231
|
@ -659,8 +659,11 @@ static void reinit(struct mp_filter *vd)
|
|||
|
||||
bool use_hwdec = ctx->use_hwdec;
|
||||
init_avctx(vd);
|
||||
if (!ctx->avctx && use_hwdec)
|
||||
force_fallback(vd);
|
||||
if (!ctx->avctx && use_hwdec) {
|
||||
do {
|
||||
force_fallback(vd);
|
||||
} while (!ctx->avctx);
|
||||
}
|
||||
}
|
||||
|
||||
static void init_avctx(struct mp_filter *vd)
|
||||
|
|
Loading…
Reference in New Issue