summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-03-18 13:13:37 +0100
committerwm4 <wm4@nowhere>2016-03-18 13:14:13 +0100
commit042ca849ea6f2550ee4a14206c1dcf70659544d5 (patch)
tree297a01ff7e20afe244c0fdf1a2adc56c18da1444 /video/decode/vd_lavc.c
parentfd57503890703b705fcd82f2ba09d2d0977eb1ad (diff)
downloadmpv-042ca849ea6f2550ee4a14206c1dcf70659544d5.tar.bz2
mpv-042ca849ea6f2550ee4a14206c1dcf70659544d5.tar.xz
vd_lavc: don't get into an endless loop if decoding fails
Regression since commit 6640b22a.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c2
1 files changed, 2 insertions, 0 deletions
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;
}