fixup! Cleanup
This commit is contained in:
parent
797a87ded8
commit
8c99f55145
|
@ -200,8 +200,7 @@ defmodule MPEGAudioFrameParser.Frame do
|
|||
end
|
||||
end
|
||||
|
||||
defp parse_padding(<<@sync_word::size(11), _::size(11), 0b0::size(1), _::bits>>), do: 0
|
||||
defp parse_padding(<<@sync_word::size(11), _::size(11), 0b1::size(1), _::bits>>), do: 1
|
||||
defp parse_padding(<<@sync_word::size(11), _::size(11), padding_bit::size(1), _::bits>>), do: padding_bit
|
||||
|
||||
defp samples_per_frame(%Frame{layer: :layer1}), do: 384
|
||||
defp samples_per_frame(%Frame{layer: :layer2}), do: 1152
|
||||
|
|
|
@ -67,7 +67,7 @@ defmodule MPEGAudioFrameParser.Impl do
|
|||
end
|
||||
|
||||
# Synced, current frame not complete and we have bytes available. Add bytes to frame:
|
||||
defp process_bytes(%{current_frame: %Frame{complete: false}} = state, packet) do
|
||||
defp process_bytes(state, packet) do
|
||||
{:ok, frame, rest} = Frame.add_bytes(state.current_frame, packet)
|
||||
process_bytes(%{state | current_frame: frame}, rest)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue