From 0aecc063e04df50f3bd4e829cab69050e8db774c Mon Sep 17 00:00:00 2001 From: chenchengbin Date: Wed, 1 Apr 2020 09:55:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2ingester=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E8=B0=83=E7=94=A8stop=E5=AF=BC=E8=87=B4=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trunk/src/app/srs_app_edge.cpp | 1 + trunk/src/app/srs_app_edge.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/trunk/src/app/srs_app_edge.cpp b/trunk/src/app/srs_app_edge.cpp index 8c057af51..dc09ee0c8 100644 --- a/trunk/src/app/srs_app_edge.cpp +++ b/trunk/src/app/srs_app_edge.cpp @@ -690,6 +690,7 @@ void SrsPlayEdge::on_all_client_stop() // when all client disconnected, // and edge is ingesting origin stream, abort it. if (state == SrsEdgeStatePlay || state == SrsEdgeStateIngestConnected) { + state = SrsEdgeStateIngestStoping; // avoid multi call stop ingester->stop(); SrsEdgeState pstate = state; diff --git a/trunk/src/app/srs_app_edge.hpp b/trunk/src/app/srs_app_edge.hpp index 4c7249614..778c7b592 100644 --- a/trunk/src/app/srs_app_edge.hpp +++ b/trunk/src/app/srs_app_edge.hpp @@ -57,6 +57,7 @@ enum SrsEdgeState // play stream from origin, ingest stream SrsEdgeStateIngestConnected = 101, + SrsEdgeStateIngestStoping = 1000, // For publish edge SrsEdgeStatePublish = 200, };