Skip to content

Commit

Permalink
don't try to scan audio if file too small
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Feb 6, 2024
1 parent 5865fac commit 95a617a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ogf.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ _ogf_parse(PerlIO *infile, char *file, HV *info, HV *tags, uint8_t seeking)

#define BUF_SIZE 8500 // from vlc

if (file_size < audio_offset + OGG_HEADER_SIZE) goto out;

seek_position = file_size - BUF_SIZE;
while (1) {
if ( seek_position < audio_offset ) {
Expand Down Expand Up @@ -635,5 +637,3 @@ uint32_t compute_crc32(uint8_t *data, size_t n) {

return crc;
}


0 comments on commit 95a617a

Please sign in to comment.