|
|
|
|
@ -555,14 +555,16 @@ error:
|
|
|
|
|
static int parse_attribute_rtcp(struct sdp_attribute *output) {
|
|
|
|
|
char *ep, *start, *end;
|
|
|
|
|
|
|
|
|
|
end = output->value.s + output->value.len;
|
|
|
|
|
if (!output->value.s)
|
|
|
|
|
goto err;
|
|
|
|
|
output->attr = ATTR_RTCP;
|
|
|
|
|
end = output->value.s + output->value.len;
|
|
|
|
|
output->u.rtcp.port_num = strtol(output->value.s, &ep, 10);
|
|
|
|
|
if (ep == output->value.s)
|
|
|
|
|
return -1;
|
|
|
|
|
goto err;
|
|
|
|
|
if (output->u.rtcp.port_num <= 0 || output->u.rtcp.port_num > 0xffff) {
|
|
|
|
|
output->u.rtcp.port_num = 0;
|
|
|
|
|
return -1;
|
|
|
|
|
goto err;
|
|
|
|
|
}
|
|
|
|
|
if (*ep != ' ')
|
|
|
|
|
return 0;
|
|
|
|
|
@ -574,6 +576,11 @@ static int parse_attribute_rtcp(struct sdp_attribute *output) {
|
|
|
|
|
EXTRACT_NETWORK_ADDRESS(u.rtcp.address);
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
err:
|
|
|
|
|
ilog(LOG_WARN, "Failed to parse a=rtcp attribute, ignoring");
|
|
|
|
|
output->attr = ATTR_IGNORE;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int parse_attribute_candidate(struct sdp_attribute *output) {
|
|
|
|
|
|