aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorAnton Khirnov2013-10-26 22:46:48 +0200
committerAnton Khirnov2013-10-28 07:22:18 +0100
commit23a211cbba0b7c9ee694040031b2e5da1be54a00 (patch)
treecf496d9ae1c70bd97f985b1ac6b1e3e377802a6a /libavcodec/wavpack.c
parentf354f30836a3148275ce60d19bbc581310249ad2 (diff)
lavc: change all decoders to behave consistently with AV_EF_CRCCHECK.
Just crccheck prints a warning, crccheck+explode returns an error. Also document this behavior.
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r--libavcodec/wavpack.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index bdc2a81d44..cbc5b04d1a 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -699,9 +699,11 @@ static inline int wv_unpack_mono(WavpackFrameContext *s, GetBitContext *gb,
} while (!last && count < s->samples);
wv_reset_saved_context(s);
- if ((s->avctx->err_recognition & AV_EF_CRCCHECK) &&
- wv_check_crc(s, crc, crc_extra_bits))
- return AVERROR_INVALIDDATA;
+ if (s->avctx->err_recognition & AV_EF_CRCCHECK) {
+ int ret = wv_check_crc(s, crc, crc_extra_bits);
+ if (ret < 0 && s->avctx->err_recognition & AV_EF_EXPLODE)
+ return ret;
+ }
return 0;
}