Skip to content

Commit

Permalink
Merge pull request #47 from scouttyg/scott/keep-fixing-m4a-files
Browse files Browse the repository at this point in the history
Add in ftyp3gp4 as valid signature for m4a
  • Loading branch information
aidewoode authored Aug 8, 2024
2 parents 0dc8bd0 + 3e2cae3 commit 7f8190c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/wahwah/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def self.file_format_from_signature(io)
# M4A is checked for first, since MP4 files start with a chunk size -
# and that chunk size may incidentally match another signature.
# No other formats would reasonably have "ftyp" as the next for bytes.
return "m4a" if signature[4...12] == "ftypM4A ".b
return "m4a" if ["ftypM4A ".b, "ftyp3gp4".b].include?(signature[4...12])
# Handled separately simply because it requires two checks.
return "wav" if signature.start_with?("RIFF".b) && signature[8...12] == "WAVE".b
magic_numbers = {
Expand Down
2 changes: 1 addition & 1 deletion lib/wahwah/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module WahWah
VERSION = "1.6.3"
VERSION = "1.6.4"
end

0 comments on commit 7f8190c

Please sign in to comment.