[FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-03-03 Thread jackarain
Signed-off-by: jackarain --- doc/protocols.texi| 6 + libavformat/network.c | 14 libavformat/network.h | 2 +- libavformat/tcp.c | 53 +-- 4 files changed, 68 insertions(+), 7 deletions(-) diff --git a/doc/protocols.texi

Re: [FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-03-02 Thread Nicolas George
Rémi Denis-Courmont (12023-03-02): > That needs to match the socket protocol family, or bind() will fail. Oh, right! The proper way to work with getaddrinfo is to create the socket afterwards based on its return, but staying within a family is a good second best choice. Thanks for noticing.

Re: [FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-03-02 Thread Rémi Denis-Courmont
Le keskiviikkona 1. maaliskuuta 2023, 17.44.56 EET jackarain a écrit : > Signed-off-by: jackarain > --- > doc/protocols.texi| 6 + > libavformat/network.c | 14 > libavformat/network.h | 2 +- > libavformat/tcp.c | 53 ++- > 4

[FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-03-01 Thread jackarain
Signed-off-by: jackarain --- doc/protocols.texi| 6 + libavformat/network.c | 14 libavformat/network.h | 2 +- libavformat/tcp.c | 53 ++- 4 files changed, 69 insertions(+), 6 deletions(-) diff --git a/doc/protocols.texi

[FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-03-01 Thread jackarain
Signed-off-by: jackarain --- doc/protocols.texi| 6 + libavformat/network.c | 14 libavformat/network.h | 2 +- libavformat/tcp.c | 53 ++- 4 files changed, 69 insertions(+), 6 deletions(-) diff --git a/doc/protocols.texi

Re: [FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-03-01 Thread jackarain
Ok, thanks. Anton Khirnov 于2023年3月1日周三 22:44写道: > Quoting jackarain (2023-02-28 16:44:20) > > -static void customize_fd(void *ctx, int fd) > > +static int customize_fd(void *ctx, int fd) > > { > > TCPContext *s = ctx; > > + > > +if (s->local_addr || s->local_port) { > > +

Re: [FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-03-01 Thread Anton Khirnov
Quoting jackarain (2023-02-28 16:44:20) > -static void customize_fd(void *ctx, int fd) > +static int customize_fd(void *ctx, int fd) > { > TCPContext *s = ctx; > + > +if (s->local_addr || s->local_port) { > +struct addrinfo hints = { 0 }, *ai; > +int ret; > + > +

[FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-02-28 Thread jackarain
Signed-off-by: jackarain --- doc/protocols.texi| 6 ++ libavformat/network.c | 14 + libavformat/network.h | 2 +- libavformat/tcp.c | 49 ++- 4 files changed, 65 insertions(+), 6 deletions(-) diff --git a/doc/protocols.texi

Re: [FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-02-28 Thread jackarain
Done. Nicolas George 于2023年2月28日周二 18:57写道: > jack (12023-02-28): > > Signed-off-by: jack > > --- > > libavformat/tcp.c | 44 > > 1 file changed, 44 insertions(+) > > Thanks for the patch > > You neglected to update the documentation, and a few

[FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-02-28 Thread jackarain
Signed-off-by: jackarain --- doc/protocols.texi| 6 ++ libavformat/network.c | 14 + libavformat/network.h | 2 +- libavformat/tcp.c | 48 ++- 4 files changed, 64 insertions(+), 6 deletions(-) diff --git a/doc/protocols.texi

Re: [FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-02-28 Thread Nicolas George
jack (12023-02-28): > Signed-off-by: jack > --- > libavformat/tcp.c | 44 > 1 file changed, 44 insertions(+) Thanks for the patch You neglected to update the documentation, and a few remarks below. > > diff --git a/libavformat/tcp.c

[FFmpeg-devel] [PATCH] libavformat/tcp: add local_addr/local_port for network option

2023-02-28 Thread jack
Signed-off-by: jack --- libavformat/tcp.c | 44 1 file changed, 44 insertions(+) diff --git a/libavformat/tcp.c b/libavformat/tcp.c index a11ccbb913..598d61067e 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -36,6 +36,8 @@ typedef struct