From a57fa4508ff1dabc92b94c4d99a5eb00ed41fb7f Mon Sep 17 00:00:00 2001 From: getroot Date: Thu, 5 Dec 2024 21:24:10 +0900 Subject: [PATCH] Fix to not fill buffer before Mux channel is ready --- src/projects/mediarouter/mediarouter_stream_tap.h | 2 +- src/projects/providers/multiplex/multiplex_stream.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/projects/mediarouter/mediarouter_stream_tap.h b/src/projects/mediarouter/mediarouter_stream_tap.h index dc580b2a9..ad6fd0e6a 100644 --- a/src/projects/mediarouter/mediarouter_stream_tap.h +++ b/src/projects/mediarouter/mediarouter_stream_tap.h @@ -64,7 +64,7 @@ friend class MediaRouteApplication; bool _is_destroy_requested = false; - bool _is_started = true; + bool _is_started = false; bool _need_past_data = false; diff --git a/src/projects/providers/multiplex/multiplex_stream.cpp b/src/projects/providers/multiplex/multiplex_stream.cpp index 41097e541..bc4b776ac 100644 --- a/src/projects/providers/multiplex/multiplex_stream.cpp +++ b/src/projects/providers/multiplex/multiplex_stream.cpp @@ -198,6 +198,7 @@ namespace pvd _pulling_state_msg = ov::String::FormatString("Multiplex Channel : %s/%s: Wait for stream %s", GetApplicationName(), GetName().CStr(), stream_url->Stream().CStr()); logti("%s", _pulling_state_msg.CStr()); + ReleaseSourceStreams(); return false; } @@ -207,6 +208,8 @@ namespace pvd { _pulling_state_msg = ov::String::FormatString("Multiplex Channel : %s/%s: Failed to mirror stream %s (err : %d)", GetApplicationName(), GetName().CStr(), source_stream->GetUrlStr().CStr(), static_cast(result)); logte("%s", _pulling_state_msg.CStr()); + + ReleaseSourceStreams(); return false; } }