summaryrefslogtreecommitdiff
path: root/libavformat/tta.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2015-02-05 23:18:58 -0300
committerJames Almer <jamrial@gmail.com>2015-02-05 23:20:40 -0300
commit15a88468aecd84ac233e0b21266a22d28307147f (patch)
tree791c9f97a247e25c2387cd9dbaea3e20a54fe316 /libavformat/tta.c
parenta6c2c8fe3f076d14c0170b4d1965a0dea0393b8d (diff)
downloadffmpeg-15a88468aecd84ac233e0b21266a22d28307147f.tar.gz
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>
Diffstat (limited to 'libavformat/tta.c')
-rw-r--r--libavformat/tta.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c
index 5789e5b4b8..a782bd7737 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -84,7 +84,7 @@ 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;
}
@@ -130,7 +130,7 @@ 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;
}