Skip to content

Commit

Permalink
Change end of stream based on flush status
Browse files Browse the repository at this point in the history
  • Loading branch information
philipgiuliani committed Oct 9, 2024
1 parent 1252a3a commit 68d1053
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/membrane/hls/sink_bin.ex
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ defmodule Membrane.HLS.SinkBin do

if state.flush, do: Packager.flush(state.opts.packager)

{[notify_parent: :end_of_stream], state}
{[notify_parent: {:end_of_stream, state.flush}], state}
else
{[], %{state | ended_sinks: ended_sinks}}
end
Expand All @@ -194,7 +194,7 @@ defmodule Membrane.HLS.SinkBin do
def handle_parent_notification(:flush, ctx, state) do
if not state.flush and all_streams_ended?(ctx, state.ended_sinks) do
Packager.flush(state.opts.packager)
{[notify_parent: :end_of_stream], %{state | flush: true}}
{[notify_parent: {:end_of_stream, true}], %{state | flush: true}}
else
{[], %{state | flush: true}}
end
Expand Down

0 comments on commit 68d1053

Please sign in to comment.