Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/libavformat/tta.c b/libavformat/tta.c
- index 5789e5b..ed17347 100644
- --- a/libavformat/tta.c
- +++ b/libavformat/tta.c
- @@ -84,9 +84,10 @@ static int tta_read_header(AVFormatContext *s)
- }
- 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");
- - return AVERROR_INVALIDDATA;
- + if (s->error_recognition & AV_EF_EXPLODE)
- + return AVERROR_INVALIDDATA;
- }
- c->frame_size = samplerate * 256 / 245;
- @@ -130,9 +131,10 @@ static int tta_read_header(AVFormatContext *s)
- framepos += size;
- }
- 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");
- - return AVERROR_INVALIDDATA;
- + if (s->error_recognition & AV_EF_EXPLODE)
- + return AVERROR_INVALIDDATA;
- }
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement