Created attachment 177416 [details] Fix rtp stream I followed the ffmpeg streaming guide to stream to RTP: https://trac.ffmpeg.org/wiki/StreamingGuide#StreamingasimpleRTPaudiostreamfromFFmpeg I got an error message: udp_resolve_host: hostname nor servname provided, or not known rtp://127.0.0.1:1234: Invalid data found when processing input It appears to relate to getnameinfo() bug. FreeBSD's socket calls require the sockaddr struct length to agree with the address family, but Linux doesn't. This patch fixes failing getnameinfo() calls on FreeBSD.
Comment on attachment 177416 [details] Fix rtp stream Looks OK except one nit: > +- getnameinfo((struct sockaddr*) &addr, sizeof(addr), > ++ getnameinfo((struct sockaddr*) &addr, > ++#ifdef __FreeBSD__ > ++ ((struct sockaddr*) &addr)->sa_len, sa_len exists on BSDs, OS X, Solaris but in ports/ only FreeBSD and DragonFly are important. Please, convert to #if HAVE_STRUCT_SOCKADDR_SA_LEN similar to libavformat/network.h.
Also add "MFH: 2016Q4" to commit message when landing.
Created attachment 177418 [details] Fix rtp stream The revised patch convert to #if HAVE_STRUCT_SOCKADDR_SA_LEN as jbiech@ suggested.
(In reply to Jan Beich (mail not working) from comment #1) Ok, I updated the patch as you suggested, thanks.
A commit references this bug: Author: kevlo Date: Sun Nov 27 13:41:01 UTC 2016 New revision: 427233 URL: https://svnweb.freebsd.org/changeset/ports/427233 Log: Fix RTP stream; FreeBSD's socket calls require the sockaddr struct length to agree with the address family. PR: 214852 Submitted by: me Approved by: jbeich MFH: 2016Q4 Changes: head/multimedia/ffmpeg/Makefile head/multimedia/ffmpeg/files/patch-libavformat_rtsp.c
Committed in r427233.
A commit references this bug: Author: kevlo Date: Tue Nov 29 13:50:12 UTC 2016 New revision: 427379 URL: https://svnweb.freebsd.org/changeset/ports/427379 Log: MFH: r427233 Fix RTP stream; FreeBSD's socket calls require the sockaddr struct length to agree with the address family. PR: 214852 Submitted by: me Approved by: jbeich Approved by: ports-secteam (junovitch) Changes: _U branches/2016Q4/ branches/2016Q4/multimedia/ffmpeg/Makefile branches/2016Q4/multimedia/ffmpeg/files/patch-libavformat_rtsp.c