{"action":"created","issue":{"url":"https://api.github.com/repos/rtcweb-wg/jsep/issues/149","labels_url":"https://api.github.com/repos/rtcweb-wg/jsep/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/rtcweb-wg/jsep/issues/149/comments","events_url":"https://api.github.com/repos/rtcweb-wg/jsep/issues/149/events","html_url":"https://github.com/rtcweb-wg/jsep/issues/149","id":87344038,"number":149,"title":"Limitation on SSRC change is in violation with RFC7160 regarding RTP PT change","user":{"login":"gloinul","id":11295323,"avatar_url":"https://avatars.githubusercontent.com/u/11295323?v=3","gravatar_id":"","url":"https://api.github.com/users/gloinul","html_url":"https://github.com/gloinul","followers_url":"https://api.github.com/users/gloinul/followers","following_url":"https://api.github.com/users/gloinul/following{/other_user}","gists_url":"https://api.github.com/users/gloinul/gists{/gist_id}","starred_url":"https://api.github.com/users/gloinul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gloinul/subscriptions","organizations_url":"https://api.github.com/users/gloinul/orgs","repos_url":"https://api.github.com/users/gloinul/repos","events_url":"https://api.github.com/users/gloinul/events{/privacy}","received_events_url":"https://api.github.com/users/gloinul/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-11T13:18:33Z","updated_at":"2015-06-15T14:15:12Z","closed_at":null,"body":"I want raise for discussion the fact that I think JSEP does not handle RTP payload type switching as currently specified.\r\n\r\nSo lets walk through a case of RTP payload type switching and what it means according to the specifications we do have.\r\n\r\nSo we have an established PeerConnection with one audio track for which we have negotiated the possibility to send both PCM and OPUS. If the sender decides to switch RTP payload type, lets say from OPUS to PCM. The reason is actually not important, but lets say due to a \"replace track\" API call as currently being discussed on W3C WebRTC group.\r\n\r\nWhen that RTP payload type switch from OPUS to PCM we also have an RTP timestamp rate change, from 48 kHz to 8 kHz. As specified in RTP usage (Section 4.3):\r\n\r\n   If performing changes between two RTP payload types that use\r\n   different RTP clock rates, an RTP sender MUST follow the\r\n   recommendations in Section 4.1 of [RFC7160].\r\n\r\nSo lets look at what RFC 7160 says:\r\n\r\n4.1.  RTP Sender (with RTCP)\r\n\r\n   An RTP Sender with RTCP turned on MUST use a different SSRC for each\r\n   different clock rate.  An RTCP BYE MUST be sent and a new SSRC MUST\r\n   be used if the clock rate switches back to a value already seen in\r\n   the RTP stream.\r\n\r\nThus, this Payload type change forces the use of a new SSRC.\r\n\r\nThis in itself should not be a significant issue. The binding to the right media block in the SDP is done using MID. Which, will be sent in an RTP header extension to ensure that stream upon reception is correctly associated. The RTP synchronization information will arrive in RTCP or even in the RTP header extension if the peers both supports RFC 6051. Thus minimal media impacts is to be expected.\r\n\r\nBut, discussing what happens in this case with Stefan Håkansson we did look into JSEP. And here we clearly have some short commings in the specification.\r\n\r\nA. First of all there is an assumption that the value of a=ssrc will not change. For example Section 5.2.2 (Subsequent Offers):\r\n\r\n  o  For MediaStreamTracks that are still present, the \"a=msid\",\r\n      \"a=ssrc\", and \"a=ssrc-group\" lines MUST stay the same.\r\n\r\nThis limitaiton can't be left in place. "},"comment":{"url":"https://api.github.com/repos/rtcweb-wg/jsep/issues/comments/112083842","html_url":"https://github.com/rtcweb-wg/jsep/issues/149#issuecomment-112083842","issue_url":"https://api.github.com/repos/rtcweb-wg/jsep/issues/149","id":112083842,"user":{"login":"fluffy","id":217200,"avatar_url":"https://avatars.githubusercontent.com/u/217200?v=3","gravatar_id":"","url":"https://api.github.com/users/fluffy","html_url":"https://github.com/fluffy","followers_url":"https://api.github.com/users/fluffy/followers","following_url":"https://api.github.com/users/fluffy/following{/other_user}","gists_url":"https://api.github.com/users/fluffy/gists{/gist_id}","starred_url":"https://api.github.com/users/fluffy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluffy/subscriptions","organizations_url":"https://api.github.com/users/fluffy/orgs","repos_url":"https://api.github.com/users/fluffy/repos","events_url":"https://api.github.com/users/fluffy/events{/privacy}","received_events_url":"https://api.github.com/users/fluffy/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T14:15:12Z","updated_at":"2015-06-15T14:15:12Z","body":"Note this is related to https://github.com/rtcweb-wg/jsep/issues/148\r\n"}}