Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
FelonEkonom committed Nov 20, 2024
1 parent e9e8c77 commit cabbcfb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/membrane/core/parent/diamond_detection_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@ defmodule Membrane.Core.Parent.DiamondDetectionController do

@spec start_diamond_detection(Parent.state()) :: :ok
def start_diamond_detection(state) do
children_with_input_pads =
state.links
|> MapSet.new(& &1.to.child)

state.children
|> Enum.each(fn {child, child_data} ->
if child_data.component_type == :bin or not MapSet.member?(children_with_input_pads, child) do
Message.send(child_data.pid, :start_diamond_detection)
end
|> Enum.each(fn {_child, %{pid: child_pid}} ->
Message.send(child_pid, :start_diamond_detection)
end)
end
end

0 comments on commit cabbcfb

Please sign in to comment.