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

Nicolas George george at nsup.org
Thu Dec 22 21:32:30 EET 2022


Camille Oudot (12022-12-22):
> This patch introduces a "reuse" option over the RTP protocol. It simply
> passes the value to the underlying UDP protocol's "reuse" option.
> 
> Some RTP peers expect multiple streams to come from the same IP/port, e.g.
> when RTP BUNDLE is involved (different streams sent from/to the same
> srcIP/srcPort/dspIp/dspPort tuple), or when rtcp-mux is involved (RTP and
> RTCP packets are muxed together).

It is not your fault, but the name of the option is misleading: it does
not reuse any sockets, it allows to reuse an *address* and maps to the
SO_REUSEADDR socket option. The misleading part is already in udp.c, but
I think we should avoid letting it proliferate.

Also, instead of passing this particular option, I think it would be
better to make the UDP context a child context of the RTP context, so
that options are applied recursively automatically.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20221222/75105f11/attachment.sig>


More information about the ffmpeg-devel mailing list