[FFmpeg-devel] [PATCH] avformat/rtpproto: add support for RTP/UDP socket reuse

"zhilizhao(赵志立)" quinkblack at foxmail.com
Mon Dec 26 05:20:09 EET 2022



> On Dec 26, 2022, at 07:52, Camille Oudot <camille+ffmpeg-devel at voila.events> wrote:
> 
> On Sun, 2022-12-25 at 11:00 +0100, Rémi Denis-Courmont wrote:
> 
> 
>> Again, there is also REUSEPORT, which is what you'd want on Linux in
>> this case, but behaves differently on BSD and doesn't exist at all on
>> Windows (IIRC).
> 
> That option is indeed preferable for security. It works equally good
> for the muxing use case, on Linux, with UDP sockets. I don't see why
> not using it instead, will do it in a new version of the patch.
> 
>> So even for sending, I don't think this patch really works.
> 
> REUSEADDR and thus this patch _are_ working well on Linux, with sockets
> that only send datagrams. It might behave differently on other systems
> though: I've read it is impossible to open two sockets having the same
> proto/src IP/src port/dst IP/dst port on BSD systems, but I don't have
> one handy. I will try it ASAP.
> 
> What is the project's policy on options that are incompatible with some
> systems, or that behave differently?

Just use the same socket file descriptor. Don’t use OS dependent hack to
implement a feature.

> 
> Regards
> 
> -- 
> Camille
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list