Differential D14563 Diff 40728 head/multimedia/mythtv/files/patch-external_FFmpeg_libavformat_rtsp.c
Changeset View
Changeset View
Standalone View
Standalone View
head/multimedia/mythtv/files/patch-external_FFmpeg_libavformat_rtsp.c
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
Fix RTP stream; FreeBSD's socket calls require the sockaddr struct length | |||||
to agree with the address family. | |||||
PR: 214852 | |||||
--- external/FFmpeg/libavformat/rtsp.c.orig 2018-02-01 11:15:37 UTC | |||||
+++ external/FFmpeg/libavformat/rtsp.c | |||||
@@ -1614,7 +1614,12 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, con | |||||
} | |||||
if (ttl > 0) | |||||
snprintf(optbuf, sizeof(optbuf), "?ttl=%d", ttl); | |||||
- getnameinfo((struct sockaddr*) &addr, sizeof(addr), | |||||
+ getnameinfo((struct sockaddr*) &addr, | |||||
+#if HAVE_STRUCT_SOCKADDR_SA_LEN | |||||
+ ((struct sockaddr*) &addr)->sa_len, | |||||
+#else | |||||
+ sizeof(addr), | |||||
+#endif | |||||
namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST); | |||||
ff_url_join(url, sizeof(url), "rtp", NULL, namebuf, | |||||
port, "%s", optbuf); | |||||
@@ -1830,8 +1835,13 @@ redirect: | |||||
goto fail; | |||||
} | |||||
if (!getpeername(tcp_fd, (struct sockaddr*) &peer, &peer_len)) { | |||||
- getnameinfo((struct sockaddr*) &peer, peer_len, host, sizeof(host), | |||||
- NULL, 0, NI_NUMERICHOST); | |||||
+ getnameinfo((struct sockaddr*) &peer, | |||||
+#if HAVE_STRUCT_SOCKADDR_SA_LEN | |||||
+ ((struct sockaddr*) &peer)->sa_len, | |||||
+#else | |||||
+ peer_len, | |||||
+#endif | |||||
+ host, sizeof(host), NULL, 0, NI_NUMERICHOST); | |||||
} | |||||
/* request options supported by the server; this also detects server | |||||
@@ -2310,7 +2320,11 @@ static int sdp_read_header(AVFormatContext *s) | |||||
AVDictionary *opts = map_to_opts(rt); | |||||
err = getnameinfo((struct sockaddr*) &rtsp_st->sdp_ip, | |||||
+#if HAVE_STRUCT_SOCKADDR_SA_LEN | |||||
+ ((struct sockaddr*) &rtsp_st->sdp_ip)->sa_len, | |||||
+#else | |||||
sizeof(rtsp_st->sdp_ip), | |||||
+#endif | |||||
namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST); | |||||
if (err) { | |||||
av_log(s, AV_LOG_ERROR, "getnameinfo: %s\n", gai_strerror(err)); |