mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 16:33:02 +00:00
vd_lavc: don't get into an endless loop if decoding fails
Regression since commit 6640b22a
.
This commit is contained in:
parent
fd57503890
commit
042ca849ea
@ -683,6 +683,8 @@ static void decode(struct dec_video *vd, struct demux_packet *packet,
|
|||||||
if (ctx->hwdec_fail_count >= opts->software_fallback)
|
if (ctx->hwdec_fail_count >= opts->software_fallback)
|
||||||
ctx->hwdec_failed = true;
|
ctx->hwdec_failed = true;
|
||||||
}
|
}
|
||||||
|
if (!ctx->hwdec_failed && packet)
|
||||||
|
packet->len = 0; // skip failed packet
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user