[FFmpeg-devel] [PATCH 1/3] avcodec/wavpack: also do crc check when er compliant is set

Michael Niedermayer michaelni at gmx.at
Sun Oct 27 09:40:23 CET 2013


Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/wavpack.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 203cd28..0d55484 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -487,7 +487,7 @@ static inline int wv_unpack_stereo(WavpackFrameContext *s, GetBitContext *gb,
     } while (!last && count < s->samples);
 
     wv_reset_saved_context(s);
-    if ((s->avctx->err_recognition & AV_EF_CRCCHECK) &&
+    if ((s->avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_COMPLIANT)) &&
         wv_check_crc(s, crc, crc_extra_bits))
         return AVERROR_INVALIDDATA;
 
@@ -548,7 +548,7 @@ 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) &&
+    if ((s->avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_COMPLIANT)) &&
         wv_check_crc(s, crc, crc_extra_bits))
         return AVERROR_INVALIDDATA;
 
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list