Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug with :stream_deleted message not handled in source bin. #106

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The package can be installed by adding `membrane_rtmp_plugin` to your list of de
```elixir
def deps do
[
{:membrane_rtmp_plugin, "~> 0.27.1"}
{:membrane_rtmp_plugin, "~> 0.27.2"}
]
end
```
Expand Down
13 changes: 13 additions & 0 deletions lib/membrane_rtmp_plugin/rtmp/source/source_bin.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ defmodule Membrane.RTMP.SourceBin do
"""
use Membrane.Bin

require Membrane.Logger
alias Membrane.{AAC, H264, RTMP}

def_output_pad :video,
Expand Down Expand Up @@ -115,6 +116,18 @@ defmodule Membrane.RTMP.SourceBin do
{[notify_parent: :unexpected_socket_close], state}
end

def handle_child_notification(:stream_deleted, :src, _ctx, state) do
{[notify_parent: :stream_deleted], state}
end

def handle_child_notification(notification, child, _ctx, state) do
Membrane.Logger.warning(
"Received unrecognized child notification from: #{inspect(child)}: #{inspect(notification)}"
)

{[], state}
end

@doc """
Passes the control of the socket to the `source`.

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.RTMP.Mixfile do
use Mix.Project

@version "0.27.1"
@version "0.27.2"
@github_url "https://github.com/membraneframework/membrane_rtmp_plugin"

def project do
Expand Down