Skip to content

Commit

Permalink
change input caps and improve handle_init/1
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldak committed Aug 5, 2021
1 parent bb0dedb commit 896bd79
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/membrane_wav/parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,14 @@ defmodule Membrane.WAV.Parser do
mode: :pull,
availability: :always,
demand_unit: :bytes,
caps: Caps
caps: :any

@impl true
def handle_init(state) do
state = Map.merge(state, %{stage: :init})
def handle_init(options) do
state =
options
|> Map.from_struct()
|> Map.put(:stage, :init)

{:ok, state}
end
Expand Down

0 comments on commit 896bd79

Please sign in to comment.