Skip to content

Commit

Permalink
Don't demand after EoS (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelonEkonom authored Nov 6, 2024
1 parent 41258da commit 92ffe9a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 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_realtimer_plugin` to your list
```elixir
def deps do
[
{:membrane_realtimer_plugin, "~> 0.10.0"}
{:membrane_realtimer_plugin, "~> 0.10.1"}
]
end
```
Expand Down
5 changes: 3 additions & 2 deletions lib/membrane/realtimer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ defmodule Membrane.Realtimer do
end

@impl true
def handle_tick(:timer, _ctx, state) do
def handle_tick(:timer, ctx, state) do
actions =
[timer_interval: {:timer, :no_interval}] ++
Enum.reverse(state.tick_actions) ++ [demand: {:input, 1}]
Enum.reverse(state.tick_actions) ++
if ctx.pads.input.end_of_stream?, do: [], else: [demand: {:input, 1}]

{maybe_stop_timer, state} =
case state.timer_status do
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.Realtimer.Plugin.Mixfile do
use Mix.Project

@version "0.10.0"
@version "0.10.1"
@github_url "https://github.com/membraneframework/membrane_realtimer_plugin"

def project do
Expand Down

0 comments on commit 92ffe9a

Please sign in to comment.