You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
Revert "mpegaudiodec_template: disable CRC checking for layers 1 and 2"
This reverts commit b48397e7b8
.
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>
This commit is contained in:
@@ -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);
|
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);
|
uint16_t crc = get_bits(&s->gb, 16);
|
||||||
if (s->err_recognition & AV_EF_CRCCHECK) {
|
if (s->err_recognition & AV_EF_CRCCHECK) {
|
||||||
const int sec_len = s->lsf ? ((s->nb_channels == 1) ? 9 : 17) :
|
const int sec_len = s->lsf ? ((s->nb_channels == 1) ? 9 : 17) :
|
||||||
|
Reference in New Issue
Block a user