From 040c132fb6e4c665d82a04f1846e7d52c200e65f Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 6 Sep 2020 18:24:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96stopSendRtp=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebApi.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index 51afc9e5..0064a462 100644 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -837,7 +837,9 @@ void installWebApi() { throw ApiRetException("该媒体流不存在", API::OtherFailed); } - val["result"] = src->stopSendRtp(); + if (!src->stopSendRtp()) { + throw ApiRetException("尚未开始推流,停止失败", API::OtherFailed); + } });