Bug 863833 - WebRTC - AddTrack only when AddStream successful r=abr
authorEthan Hugg <ethanhugg@gmail.com>
Fri, 19 Apr 2013 14:56:16 -0700
changeset 140706 93f79ae43c2ae189263ea0cc17cc83688608ca61
parent 140705 b0268b65bc46e27bd32b249989d2f0416c2b08f3
child 140708 07e17dd7813b59c14c73516f480dfb37fcfd28e9
child 140710 684a5ca2efb747fb525ea25b4b6b948cee031396
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersabr
bugs863833
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 863833 - WebRTC - AddTrack only when AddStream successful r=abr
media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
--- a/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
+++ b/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
@@ -4621,36 +4621,38 @@ gsmsdp_negotiate_media_lines (fsm_fcb_t 
                              TODO(ekr@rtfm.com): revisit when we have media
                              assigned to streams in the SDP */
                           if (!created_media_stream){
                               lsm_rc = lsm_add_remote_stream (dcb_p->line,
                                                               dcb_p->call_id,
                                                               media,
                                                               &pc_stream_id);
                               if (lsm_rc) {
-                                cause = CC_CAUSE_NO_MEDIA;
+                                return (CC_CAUSE_NO_MEDIA);
                               } else {
                                 MOZ_ASSERT(pc_stream_id == 0);
                                 /* Use index 0 because we only have one stream */
                                 result = gsmsdp_add_remote_stream(0,
                                                                   pc_stream_id,
                                                                   dcb_p);
                                 MOZ_ASSERT(result);  /* TODO(ekr@rtfm.com)
                                                         add real error checking,
                                                         but this "can't fail" */
                                 created_media_stream = TRUE;
                               }
                           }
 
-                          /* Now add the track to the single media stream.
-                             use index 0 because we only have one stream */
-                          result = gsmsdp_add_remote_track(0, i, dcb_p, media);
-                          MOZ_ASSERT(result);  /* TODO(ekr@rtfm.com) add real
-                                                 error checking, but this
-                                                 "can't fail" */
+                          if (created_media_stream) {
+                                /* Now add the track to the single media stream.
+                                   use index 0 because we only have one stream */
+                                result = gsmsdp_add_remote_track(0, i, dcb_p, media);
+                                MOZ_ASSERT(result);  /* TODO(ekr@rtfm.com) add real
+                                                       error checking, but this
+                                                       "can't fail" */
+                          }
                       }
                   }
               }
             }
 
             break;
 
         default: