mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
sdp: Only specify the TTL for IPv4 addresses
According to RFC 4566, a TTL value must not be present for IPv6 multicast. Originally committed as revision 25412 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6ded3a0411
commit
6898677e54
@ -56,7 +56,9 @@ static void sdp_write_address(char *buff, int size, const char *dest_addr,
|
|||||||
if (dest_addr) {
|
if (dest_addr) {
|
||||||
if (!dest_type)
|
if (!dest_type)
|
||||||
dest_type = "IP4";
|
dest_type = "IP4";
|
||||||
if (ttl > 0) {
|
if (ttl > 0 && !strcmp(dest_type, "IP4")) {
|
||||||
|
/* The TTL should only be specified for IPv4 multicast addresses,
|
||||||
|
* not for IPv6. */
|
||||||
av_strlcatf(buff, size, "c=IN %s %s/%d\r\n", dest_type, dest_addr, ttl);
|
av_strlcatf(buff, size, "c=IN %s %s/%d\r\n", dest_type, dest_addr, ttl);
|
||||||
} else {
|
} else {
|
||||||
av_strlcatf(buff, size, "c=IN %s %s\r\n", dest_type, dest_addr);
|
av_strlcatf(buff, size, "c=IN %s %s\r\n", dest_type, dest_addr);
|
||||||
|
Loading…
Reference in New Issue
Block a user