From 4e18f0e11c89248c9a721712846853ddd327fc57 Mon Sep 17 00:00:00 2001 From: Kimmo Taskinen Date: Sat, 21 Nov 2015 14:17:31 +0200 Subject: [PATCH] Fix ID3 parsing from 64bit file offset (DSF and DFF). --- include/id3.h | 4 ++-- src/id3.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/id3.h b/include/id3.h index 778b480..e70b81b 100644 --- a/include/id3.h +++ b/include/id3.h @@ -96,7 +96,7 @@ typedef struct id3info { uint8_t tag_data_safe; uint32_t size; uint32_t size_remain; - uint32_t offset; // For non-MP3, offset into file where tag begins + off_t offset; // For non-MP3, offset into file where tag begins } id3info; typedef struct id3_compat { @@ -117,7 +117,7 @@ extern struct id3_frametype const id3_frametype_experimental; extern struct id3_frametype const id3_frametype_unknown; extern struct id3_frametype const id3_frametype_obsolete; -int parse_id3(PerlIO *infile, char *file, HV *info, HV *tags, uint32_t seek, off_t file_size); +int parse_id3(PerlIO *infile, char *file, HV *info, HV *tags, off_t seek, off_t file_size); int _id3_parse_v1(id3info *id3); int _id3_parse_v2(id3info *id3); int _id3_parse_v2_frame(id3info *id3); diff --git a/src/id3.c b/src/id3.c index 8bb55cf..a6658b2 100644 --- a/src/id3.c +++ b/src/id3.c @@ -40,7 +40,7 @@ _varint(unsigned char *buf, int length) } int -parse_id3(PerlIO *infile, char *file, HV *info, HV *tags, uint32_t seek, off_t file_size) +parse_id3(PerlIO *infile, char *file, HV *info, HV *tags, off_t seek, off_t file_size) { int err = 0; unsigned char *bptr;