Skip to content

Commit

Permalink
Don't crash when unhandled upstream event is received (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
varsill authored Jul 9, 2024
1 parent 42b4dcd commit 5285e35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The package can be installed by adding `membrane_file_plugin` to your list of de
```elixir
def deps do
[
{:membrane_file_plugin, "~> 0.17.1"}
{:membrane_file_plugin, "~> 0.17.2"}
]
end
```
Expand Down
5 changes: 5 additions & 0 deletions lib/membrane_file/source.ex
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ defmodule Membrane.File.Source do
raise "Cannot handle `Membrane.File.SeekSourceEvent` in a `#{__MODULE__}` with `seekable?: false` option."
end

@impl true
def handle_event(:output, _event, _ctx, state) do
{[], state}
end

@impl true
def handle_demand(:output, _size, :buffers, _ctx, %{chunk_size: chunk_size} = state),
do: supply_demand(chunk_size, [redemand: :output], state)
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.File.Plugin.Mixfile do
use Mix.Project

@version "0.17.1"
@version "0.17.2"

@github_url "https://github.com/membraneframework/membrane_file_plugin"

Expand Down

0 comments on commit 5285e35

Please sign in to comment.