[FFmpeg-cvslog] avformat/tta: only check for header and seek table crc if requested

James Almer git at videolan.org
Fri Feb 6 03:26:31 CET 2015


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Feb  5 23:18:58 2015 -0300| [15a88468aecd84ac233e0b21266a22d28307147f] | committer: James Almer

avformat/tta: only check for header and seek table crc if requested

Reviewed-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15a88468aecd84ac233e0b21266a22d28307147f
---

 libavformat/tta.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/tta.c b/libavformat/tta.c
index 5789e5b..a782bd7 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;
     }



More information about the ffmpeg-cvslog mailing list