[Pkg-voip-commits] [janus] 204/282: Make sure SDP rid attributes are parsed before ssrc (fixes #1072)
Jonas Smedegaard
dr at jones.dk
Wed Dec 20 21:53:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.2.6-1
in repository janus.
commit 3f45e149a8a9c2b518c9869091086d8dec45848e
Author: Lorenzo Miniero <lminiero at gmail.com>
Date: Mon Nov 27 17:13:23 2017 +0100
Make sure SDP rid attributes are parsed before ssrc (fixes #1072)
---
sdp.c | 41 ++++++++++++++++++++++++-----------------
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/sdp.c b/sdp.c
index 55897e7..1f13d91 100644
--- a/sdp.c
+++ b/sdp.c
@@ -278,6 +278,30 @@ int janus_sdp_process(void *ice_handle, janus_sdp *remote_sdp) {
g_free(stream->rpass);
stream->rpass = g_strdup(rpass);
}
+ /* Is simulcasting enabled, using rid? (we need to check this before parsing SSRCs) */
+ tempA = m->attributes;
+ while(tempA) {
+ janus_sdp_attribute *a = (janus_sdp_attribute *)tempA->data;
+ if(a->name && !strcasecmp(a->name, "rid")) {
+ /* This attribute is used by Firefox for simulcasting */
+ char rid[16];
+ if(sscanf(a->value, "%15s send", rid) != 1) {
+ JANUS_LOG(LOG_ERR, "[%"SCNu64"] Failed to parse rid attribute...\n", handle->handle_id);
+ } else {
+ JANUS_LOG(LOG_VERB, "[%"SCNu64"] Parsed rid: %s\n", handle->handle_id, rid);
+ if(stream->rid[0] == NULL) {
+ stream->rid[0] = g_strdup(rid);
+ } else if(stream->rid[1] == NULL) {
+ stream->rid[1] = g_strdup(rid);
+ } else if(stream->rid[2] == NULL) {
+ stream->rid[2] = g_strdup(rid);
+ } else {
+ JANUS_LOG(LOG_WARN, "[%"SCNu64"] Too many RTP Stream IDs, ignoring '%s'...\n", handle->handle_id, rid);
+ }
+ }
+ }
+ tempA = tempA->next;
+ }
/* Now look for candidates and other info */
tempA = m->attributes;
while(tempA) {
@@ -296,23 +320,6 @@ int janus_sdp_process(void *ice_handle, janus_sdp *remote_sdp) {
JANUS_LOG(LOG_ERR, "[%"SCNu64"] Failed to parse candidate... (%d)\n", handle->handle_id, res);
}
}
- } else if(!strcasecmp(a->name, "rid")) {
- /* This attribute is used by Firefox for simulcasting */
- char rid[16];
- if(sscanf(a->value, "%15s send", rid) != 1) {
- JANUS_LOG(LOG_ERR, "[%"SCNu64"] Failed to parse rid attribute...\n", handle->handle_id);
- } else {
- JANUS_LOG(LOG_VERB, "[%"SCNu64"] Parsed rid: %s\n", handle->handle_id, rid);
- if(stream->rid[0] == NULL) {
- stream->rid[0] = g_strdup(rid);
- } else if(stream->rid[1] == NULL) {
- stream->rid[1] = g_strdup(rid);
- } else if(stream->rid[2] == NULL) {
- stream->rid[2] = g_strdup(rid);
- } else {
- JANUS_LOG(LOG_WARN, "[%"SCNu64"] Too many RTP Stream IDs, ignoring '%s'...\n", handle->handle_id, rid);
- }
- }
} else if(!strcasecmp(a->name, "ssrc-group")) {
/* FIXME This can be either FID or SIM */
int res = janus_sdp_parse_ssrc_group(stream, (const char *)a->value, m->type == JANUS_SDP_VIDEO);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git
More information about the Pkg-voip-commits
mailing list