On 29.06.2025 05:14, Jack Lau wrote:


On Jun 29, 2025, at 11:11, Jack Lau <jacklau122...@gmail.com> wrote:

Hi Timo,
On Jun 29, 2025, at 06:49, Timo Rothenpieler <t...@rothenpieler.org> wrote:

I've actually cleaned this up a bit while trying to implement DTLS via 
schannel, and effectively removed the whole section:

https://github.com/BtbN/FFmpeg/commit/b6794f1373fb07b791cfacd2189c7efc4d6bdbcc

There's also a bunch of other necessary UDP related fixes in tls.c.

Don't try to use an http proxy for UDP. It doesn't work:
https://github.com/BtbN/FFmpeg/commit/709ce9e5c48e3a27a400cf5af35038d3f0602c8a
I totally agree with the above two patches, it’s very reasonable

Properly forward the various hosts and ports to udp.c so it actually works when 
using a non-external UDP connection:
https://github.com/BtbN/FFmpeg/commit/46375adf7d9cc61f709ab14dd2ea017995f735db
But I think this patch need a bit modify, I think the c->listen stands for 
FFmpeg if is server. When it is true, FFmpeg as server.
So maybe:
         if (c->listen) {
             av_dict_set_int(options, "localport", port, 0);
             av_dict_set(options, "localaddr", c->underlying_host, 0);Add 
commentMore actions
         } else {
             av_dict_set_int(options, "connect", 1, 0);
         }
Sry for forgetting modify this code, the right code I want to express is that:
         if (c->listen) {
             av_dict_set_int(options, "connect", 1, 0);
         } else {
             av_dict_set_int(options, "localport", port, 0);
             av_dict_set(options, "localaddr", c->underlying_host, 0);
         }

It goes together with
https://github.com/BtbN/FFmpeg/commit/6fc902eb75554e6ad91a2ddf4ce1d131feee6f55

Without setting the localport to 0 in client-mode in combination with above patch, it'll try to bind to the port passed in the URL, which when tryong to connect to a server on localhost will result in a bind failure, cause it tried to bind to the same port.

And "connect" in listen mode makes no sense to me?
There is no remote address, where would it "connect" the socket to?
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to