From 92ffe9a35c831908d52a8a97c23eec687df61017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Feliks=20Pobiedzi=C5=84ski?= <38541925+FelonEkonom@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:02:09 +0100 Subject: [PATCH] Don't demand after EoS (#26) --- README.md | 2 +- lib/membrane/realtimer.ex | 5 +++-- mix.exs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 23b5d51..b438c7e 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/lib/membrane/realtimer.ex b/lib/membrane/realtimer.ex index 733cbd7..98477d0 100644 --- a/lib/membrane/realtimer.ex +++ b/lib/membrane/realtimer.ex @@ -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 diff --git a/mix.exs b/mix.exs index af7ef6b..c78b4c1 100644 --- a/mix.exs +++ b/mix.exs @@ -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