diff --git a/Scan.xs b/Scan.xs index ee415b1..afa69b6 100644 --- a/Scan.xs +++ b/Scan.xs @@ -56,7 +56,7 @@ typedef struct { char* type; int (*get_tags)(PerlIO *infile, char *file, HV *info, HV *tags); int (*get_fileinfo)(PerlIO *infile, char *file, HV *tags); - int (*find_frame)(PerlIO *infile, char *file, int offset); + off_t (*find_frame)(PerlIO *infile, char *file, int offset); int (*find_frame_return_info)(PerlIO *infile, char *file, int offset, HV *info); } taghandler; @@ -268,7 +268,7 @@ CODE: OUTPUT: RETVAL -int +IV _find_frame( char *dummy, char *suffix, PerlIO *infile, SV *path, int offset ) CODE: { diff --git a/include/asf.h b/include/asf.h index 44004af..4eb90bb 100644 --- a/include/asf.h +++ b/include/asf.h @@ -218,5 +218,5 @@ void _parse_content_encryption(asfinfo *asf); void _parse_extended_content_encryption(asfinfo *asf); void _parse_script_command(asfinfo *asf); SV *_parse_picture(asfinfo *asf, uint32_t picture_offset); -int asf_find_frame(PerlIO *infile, char *file, int offset); +off_t asf_find_frame(PerlIO *infile, char *file, int offset); int _timestamp(asfinfo *asf, int offset, int *duration); diff --git a/include/mp3.h b/include/mp3.h index 6e7e974..bca182d 100644 --- a/include/mp3.h +++ b/include/mp3.h @@ -225,7 +225,7 @@ static int sample_rate_tbl[ ] = { int get_mp3tags(PerlIO *infile, char *file, HV *info, HV *tags); int get_mp3fileinfo(PerlIO *infile, char *file, HV *info); -int mp3_find_frame(PerlIO *infile, char *file, int offset); +off_t mp3_find_frame(PerlIO *infile, char *file, int offset); mp3info * _mp3_parse(PerlIO *infile, char *file, HV *info); int _decode_mp3_frame(unsigned char *bptr, struct mp3frame *frame); diff --git a/include/mp4.h b/include/mp4.h index d30e385..e40c772 100644 --- a/include/mp4.h +++ b/include/mp4.h @@ -123,7 +123,7 @@ typedef struct mp4info { } mp4info; static int get_mp4tags(PerlIO *infile, char *file, HV *info, HV *tags); -int mp4_find_frame(PerlIO *infile, char *file, int offset); +off_t mp4_find_frame(PerlIO *infile, char *file, int offset); int mp4_find_frame_return_info(PerlIO *infile, char *file, int offset, HV *info); mp4info * _mp4_parse(PerlIO *infile, char *file, HV *info, HV *tags, uint8_t seeking); diff --git a/include/ogf.h b/include/ogf.h index 1f7f35f..30fe8f3 100644 --- a/include/ogf.h +++ b/include/ogf.h @@ -16,7 +16,7 @@ int get_ogf_metadata(PerlIO *infile, char *file, HV *info, HV *tags); int ogf_find_frame_return_info(PerlIO *infile, char *file, int offset, HV *info); -int ogf_find_frame(PerlIO *infile, char *file, int offset); +off_t ogf_find_frame(PerlIO *infile, char *file, int offset); static int _ogf_parse(PerlIO *infile, char *file, HV *info, HV *tags, uint8_t seeking); -static int _ogf_find_frame(PerlIO *infile, char *file, int offset, HV *info, HV *tags); +static off_t _ogf_find_frame(PerlIO *infile, char *file, int offset, HV *info, HV *tags); diff --git a/include/ogg.h b/include/ogg.h index 0909fd7..653946d 100644 --- a/include/ogg.h +++ b/include/ogg.h @@ -20,6 +20,6 @@ int get_ogg_metadata(PerlIO *infile, char *file, HV *info, HV *tags); int _ogg_parse(PerlIO *infile, char *file, HV *info, HV *tags, uint8_t seeking); -static int ogg_find_frame(PerlIO *infile, char *file, int offset); +static off_t ogg_find_frame(PerlIO *infile, char *file, int offset); void _parse_vorbis_comments(PerlIO *infile, Buffer *vorbis_buf, HV *tags, int has_framing); int _ogg_binary_search_sample(PerlIO *infile, char *file, HV *info, uint64_t target_sample); diff --git a/include/opus.h b/include/opus.h index b878ff9..820283d 100644 --- a/include/opus.h +++ b/include/opus.h @@ -18,6 +18,6 @@ int get_opus_metadata(PerlIO *infile, char *file, HV *info, HV *tags); int _opus_parse(PerlIO *infile, char *file, HV *info, HV *tags, uint8_t seeking); -static int opus_find_frame(PerlIO *infile, char *file, int offset); +static off_t opus_find_frame(PerlIO *infile, char *file, int offset); void _parse_vorbis_comments(PerlIO *infile, Buffer *vorbis_buf, HV *tags, int has_framing); int _opus_binary_search_sample(PerlIO *infile, char *file, HV *info, uint64_t target_sample); diff --git a/src/asf.c b/src/asf.c index 216eac9..047e690 100644 --- a/src/asf.c +++ b/src/asf.c @@ -1495,7 +1495,7 @@ _parse_picture(asfinfo *asf, uint32_t picture_offset) // offset is in ms // Based on some code from Rockbox -int +off_t asf_find_frame(PerlIO *infile, char *file, int time_offset) { int frame_offset = -1; diff --git a/src/flac.c b/src/flac.c index eeeee66..b7e471b 100644 --- a/src/flac.c +++ b/src/flac.c @@ -270,7 +270,7 @@ _flac_parse(PerlIO *infile, char *file, HV *info, HV *tags, uint8_t seeking) // offset is in ms, does sample-accurate seeking, using seektable if available // based on libFLAC seek_to_absolute_sample_ -static int +static off_t flac_find_frame(PerlIO *infile, char *file, int offset) { off_t frame_offset = -1; diff --git a/src/mp3.c b/src/mp3.c index 934f05f..8c8e097 100644 --- a/src/mp3.c +++ b/src/mp3.c @@ -903,7 +903,7 @@ _mp3_parse(PerlIO *infile, char *file, HV *info) return mp3; } -int +off_t mp3_find_frame(PerlIO *infile, char *file, int offset) { Buffer mp3_buf; diff --git a/src/mp4.c b/src/mp4.c index c2aa3aa..37985d6 100644 --- a/src/mp4.c +++ b/src/mp4.c @@ -27,7 +27,7 @@ get_mp4tags(PerlIO *infile, char *file, HV *info, HV *tags) } // wrapper to return just the file offset -int +off_t mp4_find_frame(PerlIO *infile, char *file, int offset) { HV *info = newHV(); diff --git a/src/ogf.c b/src/ogf.c index d94e3e8..2681f57 100644 --- a/src/ogf.c +++ b/src/ogf.c @@ -434,7 +434,7 @@ _ogf_parse(PerlIO *infile, char *file, HV *info, HV *tags, uint8_t seeking) return err; } -int +off_t ogf_find_frame(PerlIO *infile, char *file, int offset) { HV *info = newHV(); @@ -455,7 +455,7 @@ ogf_find_frame(PerlIO *infile, char *file, int offset) return frame_offset; } -static int +static off_t _ogf_find_frame(PerlIO *infile, char *file, int offset, HV *info, HV *tags) { int frame_offset = -1; diff --git a/src/ogg.c b/src/ogg.c index f03c3a1..9bcc3f3 100644 --- a/src/ogg.c +++ b/src/ogg.c @@ -500,7 +500,7 @@ _parse_vorbis_comments(PerlIO *infile, Buffer *vorbis_buf, HV *tags, int has_fra } } -static int +static off_t ogg_find_frame(PerlIO *infile, char *file, int offset) { int frame_offset = -1; diff --git a/src/opus.c b/src/opus.c index 778284b..2354b1d 100644 --- a/src/opus.c +++ b/src/opus.c @@ -349,7 +349,7 @@ _opus_parse(PerlIO *infile, char *file, HV *info, HV *tags, uint8_t seeking) return 0; } -static int +static off_t opus_find_frame(PerlIO *infile, char *file, int offset) { int frame_offset = -1;