summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec_template.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-08-03 10:27:21 -0300
committerJames Almer <jamrial@gmail.com>2020-08-03 10:37:49 -0300
commit9afd1f6ff2652daefd134350171f35f97c3e069b (patch)
tree0aac85ab7866125b33613a384389d97bccf1d225 /libavcodec/mpegaudiodec_template.c
parentb068cfccdda00f8b855f0982ff375a50e4adbfe6 (diff)
downloadffmpeg-9afd1f6ff2652daefd134350171f35f97c3e069b.tar.gz
Revert "mpegaudiodec_template: disable CRC checking for layers 1 and 2"
This reverts commit b48397e7b84864f2d4c70361a4c4bed93e826753. The change did not disable crc checks for layer 1 & 2, it removed reading the CRC field. Fixes decoding some mp2 samples and FATE test failures. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mpegaudiodec_template.c')
-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 f03d7bc275..3d7e3ba4f2 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -1566,7 +1566,7 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT **samples,
init_get_bits(&s->gb, buf + HEADER_SIZE, (buf_size - HEADER_SIZE) * 8);
- if (s->error_protection && s->layer == 3) {
+ if (s->error_protection) {
uint16_t crc = get_bits(&s->gb, 16);
if (s->err_recognition & AV_EF_CRCCHECK) {
const int sec_len = s->lsf ? ((s->nb_channels == 1) ? 9 : 17) :