summaryrefslogtreecommitdiff
path: root/libavformat/tta.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-08-04 16:17:44 -0300
committerJames Almer <jamrial@gmail.com>2016-08-04 16:25:36 -0300
commitce944e84892f1ba21602bd83b1a5d532dfdd1eda (patch)
tree57ecb29b06c79b8b5f42c63bcb371c637485707e /libavformat/tta.c
parent155f4e963021c5b8d6271d1e34219576dcff6906 (diff)
downloadffmpeg-ce944e84892f1ba21602bd83b1a5d532dfdd1eda.tar.gz
avformat/tta: remove custom crc callback function
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/tta.c')
-rw-r--r--libavformat/tta.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c
index 02656acffd..1447effcd8 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -35,12 +35,6 @@ typedef struct TTAContext {
int last_frame_size;
} TTAContext;
-static unsigned long tta_check_crc(unsigned long checksum, const uint8_t *buf,
- unsigned int len)
-{
- return av_crc(av_crc_get_table(AV_CRC_32_IEEE_LE), checksum, buf, len);
-}
-
static int tta_probe(AVProbeData *p)
{
if (AV_RL32(&p->buf[0]) == MKTAG('T', 'T', 'A', '1') &&
@@ -65,7 +59,7 @@ static int tta_read_header(AVFormatContext *s)
start_offset = avio_tell(s->pb);
if (start_offset < 0)
return start_offset;
- ffio_init_checksum(s->pb, tta_check_crc, UINT32_MAX);
+ ffio_init_checksum(s->pb, ff_crcEDB88320_update, UINT32_MAX);
if (avio_rl32(s->pb) != AV_RL32("TTA1"))
return AVERROR_INVALIDDATA;
@@ -121,7 +115,7 @@ static int tta_read_header(AVFormatContext *s)
avio_seek(s->pb, start_offset, SEEK_SET);
avio_read(s->pb, st->codecpar->extradata, st->codecpar->extradata_size);
- ffio_init_checksum(s->pb, tta_check_crc, UINT32_MAX);
+ ffio_init_checksum(s->pb, ff_crcEDB88320_update, UINT32_MAX);
for (i = 0; i < c->totalframes; i++) {
uint32_t size = avio_rl32(s->pb);
int r;