avformat/tta: only check for header and seek table crc if requested
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
a6c2c8fe3f
commit
15a88468ae
@ -84,7 +84,7 @@ static int tta_read_header(AVFormatContext *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
crc = ffio_get_checksum(s->pb) ^ UINT32_MAX;
|
crc = ffio_get_checksum(s->pb) ^ UINT32_MAX;
|
||||||
if (crc != avio_rl32(s->pb)) {
|
if (crc != avio_rl32(s->pb) && s->error_recognition & AV_EF_CRCCHECK) {
|
||||||
av_log(s, AV_LOG_ERROR, "Header CRC error\n");
|
av_log(s, AV_LOG_ERROR, "Header CRC error\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ static int tta_read_header(AVFormatContext *s)
|
|||||||
framepos += size;
|
framepos += size;
|
||||||
}
|
}
|
||||||
crc = ffio_get_checksum(s->pb) ^ UINT32_MAX;
|
crc = ffio_get_checksum(s->pb) ^ UINT32_MAX;
|
||||||
if (crc != avio_rl32(s->pb)) {
|
if (crc != avio_rl32(s->pb) && s->error_recognition & AV_EF_CRCCHECK) {
|
||||||
av_log(s, AV_LOG_ERROR, "Seek table CRC error\n");
|
av_log(s, AV_LOG_ERROR, "Seek table CRC error\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user