summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/mpegaudiodec_template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c
index 3d7e3ba4f2..3ae73d3c8d 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -1568,7 +1568,7 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT **samples,
if (s->error_protection) {
uint16_t crc = get_bits(&s->gb, 16);
- if (s->err_recognition & AV_EF_CRCCHECK) {
+ if (s->err_recognition & AV_EF_CRCCHECK && s->layer == 3) {
const int sec_len = s->lsf ? ((s->nb_channels == 1) ? 9 : 17) :
((s->nb_channels == 1) ? 17 : 32);
const AVCRC *crc_tab = av_crc_get_table(AV_CRC_16_ANSI);