1
0
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:
wm4 2016-03-18 13:13:37 +01:00
parent fd57503890
commit 042ca849ea

View File

@ -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;
} }