From 042ca849ea6f2550ee4a14206c1dcf70659544d5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 18 Mar 2016 13:13:37 +0100 Subject: vd_lavc: don't get into an endless loop if decoding fails Regression since commit 6640b22a. --- video/decode/vd_lavc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'video/decode') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index fa1d2ddf55..7217b2b9e7 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -683,6 +683,8 @@ static void decode(struct dec_video *vd, struct demux_packet *packet, if (ctx->hwdec_fail_count >= opts->software_fallback) ctx->hwdec_failed = true; } + if (!ctx->hwdec_failed && packet) + packet->len = 0; // skip failed packet return; } -- cgit v1.2.3