From d81cde695d757b2822f1191a5c75f9f0018931e8 Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 31 Mar 2020 22:48:38 +0800 Subject: [PATCH] Refactor code --- trunk/src/app/srs_app_gb28181.cpp | 4 +--- trunk/src/app/srs_app_gb28181.hpp | 2 -- trunk/src/app/srs_app_http_api.cpp | 2 -- trunk/src/protocol/srs_sip_stack.cpp | 1 - 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/trunk/src/app/srs_app_gb28181.cpp b/trunk/src/app/srs_app_gb28181.cpp index 29373ae166..ea196e61ab 100644 --- a/trunk/src/app/srs_app_gb28181.cpp +++ b/trunk/src/app/srs_app_gb28181.cpp @@ -231,7 +231,7 @@ srs_error_t SrsGb28181PsRtpProcessor::on_udp_packet(const sockaddr* from, const //get previous timestamp by ssrc uint32_t pre_timestamp = pre_packet[pre_pkt_key]->timestamp; - uint32_t pre_sequence_number = pre_packet[pre_pkt_key]->sequence_number; + //uint32_t pre_sequence_number = pre_packet[pre_pkt_key]->sequence_number; //TODO: check sequence number out of order //it may be out of order, or multiple streaming ssrc are the same @@ -1403,8 +1403,6 @@ srs_error_t SrsGb28181Manger::start_ps_rtp_listen(std::string id, int port) void SrsGb28181Manger::stop_rtp_listen(std::string id) { - srs_error_t err = srs_success; - map::iterator it = rtmpmuxers.find(id); if (it == rtmpmuxers.end()){ return; diff --git a/trunk/src/app/srs_app_gb28181.hpp b/trunk/src/app/srs_app_gb28181.hpp index 812f390fbf..b206a1ff2b 100644 --- a/trunk/src/app/srs_app_gb28181.hpp +++ b/trunk/src/app/srs_app_gb28181.hpp @@ -221,8 +221,6 @@ class SrsGb28181RtmpMuxer : public ISrsCoroutineHandler, std::string _rtmp_url; std::string video_ssrc; std::string audio_ssrc; - int audio_sample_rate; - int audio_channel; SrsGb28181Manger* gb28181_manger; SrsCoroutine* trd; diff --git a/trunk/src/app/srs_app_http_api.cpp b/trunk/src/app/srs_app_http_api.cpp index 2b4e09afe2..92094bffc7 100644 --- a/trunk/src/app/srs_app_http_api.cpp +++ b/trunk/src/app/srs_app_http_api.cpp @@ -976,8 +976,6 @@ srs_error_t SrsGoApiRtcPlay::exchange_sdp(const std::string& app, const std::str local_sdp.group_policy_ = "BUNDLE"; - int mid = 0; - for (int i = 0; i < remote_sdp.media_descs_.size(); ++i) { const SrsMediaDesc& remote_media_desc = remote_sdp.media_descs_[i]; diff --git a/trunk/src/protocol/srs_sip_stack.cpp b/trunk/src/protocol/srs_sip_stack.cpp index e24e743c24..c0b06e55b5 100644 --- a/trunk/src/protocol/srs_sip_stack.cpp +++ b/trunk/src/protocol/srs_sip_stack.cpp @@ -99,7 +99,6 @@ std::string srs_sip_get_param(std::string msg, std::string param) { std::vector vec_params = srs_string_split(msg, ";"); - size_t min_pos = string::npos; for (vector::iterator it = vec_params.begin(); it != vec_params.end(); ++it) { string value = *it;