From 271b180004e6c66c8277cc3b87f250d070987eb5 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 11 Apr 2021 11:39:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=81=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6track=E5=92=8Cregist=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebApi.cpp | 2 +- server/WebHook.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index ad0c7bd8..6c88f4f5 100755 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -272,7 +272,7 @@ Value makeMediaSourceJson(MediaSource &media){ item["originSock"] = Json::nullValue; } - for(auto &track : media.getTracks()){ + for(auto &track : media.getTracks(false)){ Value obj; auto codec_type = track->getTrackType(); obj["codec_id"] = track->getCodecId(); diff --git a/server/WebHook.cpp b/server/WebHook.cpp index 1bd47ffb..d1df3308 100755 --- a/server/WebHook.cpp +++ b/server/WebHook.cpp @@ -301,14 +301,15 @@ void installWebHook(){ return; } ArgsType body; - body["regist"] = bRegist; if (bRegist) { body = makeMediaSourceJson(sender); + body["regist"] = bRegist; } else { body["schema"] = sender.getSchema(); body["vhost"] = sender.getVhost(); body["app"] = sender.getApp(); body["stream"] = sender.getId(); + body["regist"] = bRegist; } //执行hook do_http_hook(hook_stream_chaned,body, nullptr);