LWE_Release_200609_55956d4 40/235740/1 accepted/tizen/unified/20200612.022255 submit/tizen/20200609.075101
authorRyan Hyun Choi <ryan.choi@samsung.com>
Tue, 9 Jun 2020 07:44:25 +0000 (16:44 +0900)
committerRyan Hyun Choi <ryan.choi@samsung.com>
Tue, 9 Jun 2020 07:46:35 +0000 (16:46 +0900)
Change-Id: I92624a7e71aaa921377434a291dcaa6f834becfb
Signed-off-by: Ryan Choi <ryan.choi@samsung.com>
src/StarfishInfo.h
src/core/modules/mediastream/RTCPeerConnection.cpp

index 871cfbb..0ca64f2 100644 (file)
@@ -25,7 +25,7 @@
 #define PRODUCT_NAME "Gecko"
 #define STARFISH_NAME "Starfish"
 #define VENDOR_NAME "Samsung Electronics Co., Ltd."
-#define VERSION "1.0.0/" "200603_af07c17"
+#define VERSION "1.0.0/" "200609_55956d4"
 #define USER_AGENT(STARFISH_NAME, VERSION) \
     "Mozilla/5.0 (like Gecko/54.0 Firefox/54.0) " STARFISH_NAME "/" VERSION
 #define USER_AGENT_MAXIMUM_DATE_VALUE 8.64e15
index d3bbc50..07c2724 100644 (file)
@@ -1428,7 +1428,7 @@ Promise* RTCPeerConnection::addIceCandidate(RTCIceCandidateInit init)
 
     bool hasValidSdpMid = false;
     if (init.m_sdpMid.hasValue()) {
-        size_t lineIndex;
+        size_t lineIndex = 0;
         size_t mediaSectionSize = remoteDescription->number_of_mediasections();
         for (size_t i = 0; i < mediaSectionSize; i++) {
             const webrtc::IceCandidateCollection* candidateCollection =
@@ -2057,12 +2057,16 @@ void RTCPeerConnection::removeTrack(RTCRtpSender* sender)
     m_backend->RemoveTrackNew(sender->backend());
     aliveSender->setTrack(nullptr);
 
+    if (!existingTransceiver) {
+        STARFISH_LOG_ERROR("%s: Transceiver not exist\n", __func__);
+        return;
+    }
+
     if (existingTransceiver->direction() ==
         RTCRtpTransceiverDirection::Sendrecv) {
         existingTransceiver->setDirection(RTCRtpTransceiverDirection::Recvonly);
-    }
-    if (existingTransceiver->direction() ==
-        RTCRtpTransceiverDirection::Sendonly) {
+    } else if (existingTransceiver->direction() ==
+               RTCRtpTransceiverDirection::Sendonly) {
         existingTransceiver->setDirection(RTCRtpTransceiverDirection::Inactive);
     }
 }