Merge pull request #44 from colinstark/non-id3-mp3s

Support for MP3 files without ID3 headers
This commit is contained in:
Chris McCord 2022-02-22 10:49:17 -05:00 committed by GitHub
commit 949c985dff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,15 @@ defmodule LiveBeats.MP3Stat do
parse_frames(major_version, rest, tag_size - ext_header_size, [])
end
defp parse_tag(<<
_first::integer,
_second::integer,
_third::integer,
_rest::binary
>>) do
{%{}, binary} # has no ID3
end
defp parse_tag(_), do: {%{}, ""}
defp decode_synchsafe_integer(<<bin>>), do: bin