Skip to content

Commit

Permalink
propagate end of stream even without start of stream
Browse files Browse the repository at this point in the history
  • Loading branch information
balins committed Dec 11, 2023
1 parent 58d8659 commit 1b187bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/membrane_rtmp_plugin/rtmp/source/source.ex
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ defmodule Membrane.RTMP.Source do

@impl true
def handle_info({:socket_closed, _socket}, ctx, state) do
cond do
ctx.pads.output.end_of_stream? -> {[], state}
ctx.pads.output.start_of_stream? -> {[end_of_stream: :output], state}
true -> {[notify_parent: :unexpected_socket_closed], state}
if ctx.pads.output.end_of_stream? do
{[], state}
else
{[notify_parent: :unexpected_socket_closed, end_of_stream: :output], state}
end
end

Expand Down

0 comments on commit 1b187bb

Please sign in to comment.