Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2017-01-26 Thread Massimo Battistel
> > > Ive reupped the current versions of each seperated patch for comment > ___ > > Hi, could this patch fix issue #5783? (https://trac.ffmpeg.org/ticket/5783) Thanks, MB ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-06 Thread Matt Oliver
On 4 December 2016 at 01:56, Matt Oliver wrote: > Indeed, in theory that would work. I always forget about these options. >> In my experience they do not work reliably, and I would argue against >> their use in portable code. For example, starting there: >>

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-03 Thread Matt Oliver
> > Indeed, in theory that would work. I always forget about these options. > In my experience they do not work reliably, and I would argue against > their use in portable code. For example, starting there: > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html > can you tell

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-03 Thread Hendrik Leppkes
On Sat, Dec 3, 2016 at 2:13 PM, Matt Oliver wrote: > On 3 December 2016 at 23:40, Hendrik Leppkes wrote: > >> On Sat, Dec 3, 2016 at 1:33 PM, Matt Oliver wrote: >> > >> > I havent fully tested Hendriks idea as the msdn docs dont

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-03 Thread Nicolas George
Replying for the completeness of the discussion. Le tridi 13 frimaire, an CCXXV, Matt Oliver a écrit : > Thats the trick, not to large that it results noticeable shutdown delays to > the user but not to quick that it polls to often, on a modern machine id > think something like 0.01s would be ok.

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-03 Thread Nicolas George
Le quartidi 14 frimaire, an CCXXV, Matt Oliver a écrit : > Would something like the following work for you: I would not oppose on principle, just a few details. > > --- > libavformat/udp.c | 46 +- > 1 file changed, 29 insertions(+), 17 deletions(-)

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-03 Thread Matt Oliver
On 3 December 2016 at 23:40, Hendrik Leppkes wrote: > On Sat, Dec 3, 2016 at 1:33 PM, Matt Oliver wrote: > > > > I havent fully tested Hendriks idea as the msdn docs dont recommend > calling > > multiple winsock functions at the same time from

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-03 Thread Hendrik Leppkes
On Sat, Dec 3, 2016 at 1:33 PM, Matt Oliver wrote: > > I havent fully tested Hendriks idea as the msdn docs dont recommend calling > multiple winsock functions at the same time from different threads so i > wasnt sure about how well received a patch that relies on

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-03 Thread Matt Oliver
On 3 December 2016 at 22:33, Nicolas George wrote: > Le tridi 13 frimaire, an CCXXV, Matt Oliver a écrit : > > I was just writing an email to rephrase but you beet me to it (sorry i > > wasnt faster) > > No problem. > > > I should rephrase this to "Why is polling with an

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-03 Thread Nicolas George
Le tridi 13 frimaire, an CCXXV, Matt Oliver a écrit : > I was just writing an email to rephrase but you beet me to it (sorry i > wasnt faster) No problem. > I should rephrase this to "Why is polling with an acceptable timeout/sleep > not acceptable". Obviously a event based callback would be

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-03 Thread Matt Oliver
On 3 December 2016 at 22:05, Nicolas George wrote: > Le tridi 13 frimaire, an CCXXV, Matt Oliver a écrit : > > That was because the pthread wrappers dont set errno, so its a required > > change to remove dependency on pthread. > > The pthread wrappers are supposed to match the

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-03 Thread Nicolas George
Le tridi 13 frimaire, an CCXXV, Matt Oliver a écrit : > That was because the pthread wrappers dont set errno, so its a required > change to remove dependency on pthread. The pthread wrappers are supposed to match the pthread API, and it does not use errno: this change is needed by itself. > Your

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-02 Thread Nicolas George
Le duodi 12 frimaire, an CCXXV, Matt Oliver a écrit : > Which changes would those be? The fix of errno / return value for pthread_cond_timedwait() for example. > This function is already set as nonblocking I think you read this specific part of the code wrong. Unfortunately, since

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-02 Thread Matt Oliver
On 2 December 2016 at 22:16, Nicolas George wrote: > Le duodi 12 frimaire, an CCXXV, Matt Oliver a écrit : > > --- > > configure | 6 -- > > libavformat/udp.c | 48 +++- > > 2 files changed, 19 insertions(+), 35

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-02 Thread Nicolas George
Le duodi 12 frimaire, an CCXXV, Matt Oliver a écrit : > --- > configure | 6 -- > libavformat/udp.c | 48 +++- > 2 files changed, 19 insertions(+), 35 deletions(-) It looks like there are unrelated changes in this patch. Can you explain

Re: [FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-02 Thread Hendrik Leppkes
On Fri, Dec 2, 2016 at 9:22 AM, Matt Oliver wrote: > --- > configure | 6 -- > libavformat/udp.c | 48 +++- > 2 files changed, 19 insertions(+), 35 deletions(-) > > diff --git a/configure b/configure > index

[FFmpeg-devel] [PATCH 2/2] avformat/udp: Replace use of pthread_cancel.

2016-12-02 Thread Matt Oliver
--- configure | 6 -- libavformat/udp.c | 48 +++- 2 files changed, 19 insertions(+), 35 deletions(-) diff --git a/configure b/configure index b5bfad6..cec94c4 100755 --- a/configure +++ b/configure @@ -1934,7 +1934,6 @@ SYSTEM_FUNCS="