Re: [FFmpeg-devel] [PATCH 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-04 Thread Jan Sebechlebsky
On 08/03/2016 03:41 PM, Nicolas George wrote: Le sextidi 16 thermidor, an CCXXIV, sebechlebsky...@gmail.com a écrit : +if (ctx->termination_requested) +return 1; This is a common misconception: volatile is not enough for thread communication. IIUC, volatile forces the compiler to

Re: [FFmpeg-devel] [PATCH 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-03 Thread Michael Niedermayer
On Wed, Aug 03, 2016 at 03:41:14PM +0200, Nicolas George wrote: > Le sextidi 16 thermidor, an CCXXIV, sebechlebsky...@gmail.com a écrit : > > From: Jan Sebechlebsky [...] > > +ret = pthread_tryjoin_np( fifo->writer_thread, NULL); > > This function is a GNU extension (np means nonportable)

Re: [FFmpeg-devel] [PATCH 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-03 Thread Nicolas George
Le sextidi 16 thermidor, an CCXXIV, sebechlebsky...@gmail.com a écrit : > From: Jan Sebechlebsky > > Add support for nonblocking calls. > > Signed-off-by: Jan Sebechlebsky > --- > libavformat/fifo.c | 70 > +- > 1 file changed, 59 insertions

Re: [FFmpeg-devel] [PATCH 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-02 Thread Michael Niedermayer
On Tue, Aug 02, 2016 at 03:24:21PM +0200, sebechlebsky...@gmail.com wrote: > From: Jan Sebechlebsky > > Add support for nonblocking calls. > > Signed-off-by: Jan Sebechlebsky > --- > libavformat/fifo.c | 70 > +- > 1 file changed, 59 inserti

[FFmpeg-devel] [PATCH 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Add support for nonblocking calls. Signed-off-by: Jan Sebechlebsky --- libavformat/fifo.c | 70 +- 1 file changed, 59 insertions(+), 11 deletions(-) diff --git a/libavformat/fifo.c b/libavformat/fifo.c index bc8c973..e