mirror of
https://github.com/fly-apps/live_beats.git
synced 2025-01-24 05:38:07 +00:00
Merge pull request #44 from colinstark/non-id3-mp3s
Support for MP3 files without ID3 headers
This commit is contained in:
commit
949c985dff
1 changed files with 9 additions and 0 deletions
|
@ -85,6 +85,15 @@ defmodule LiveBeats.MP3Stat do
|
||||||
parse_frames(major_version, rest, tag_size - ext_header_size, [])
|
parse_frames(major_version, rest, tag_size - ext_header_size, [])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp parse_tag(<<
|
||||||
|
_first::integer,
|
||||||
|
_second::integer,
|
||||||
|
_third::integer,
|
||||||
|
_rest::binary
|
||||||
|
>>) do
|
||||||
|
{%{}, binary} # has no ID3
|
||||||
|
end
|
||||||
|
|
||||||
defp parse_tag(_), do: {%{}, ""}
|
defp parse_tag(_), do: {%{}, ""}
|
||||||
|
|
||||||
defp decode_synchsafe_integer(<<bin>>), do: bin
|
defp decode_synchsafe_integer(<<bin>>), do: bin
|
||||||
|
|
Loading…
Reference in a new issue