Re: [FFmpeg-devel] [PATCH 3/3 v3] h264: Run VLC init under pthread_once

2015-10-07 Thread Michael Niedermayer
On Wed, Oct 07, 2015 at 10:46:50PM +0200, Hendrik Leppkes wrote: > On Wed, Oct 7, 2015 at 10:18 PM, Michael Niedermayer > wrote: > > On Wed, Oct 07, 2015 at 12:28:51PM -0400, Derek Buitenhuis wrote: > >> This makes the h.264 decoder threadsafe to initialize. > > > > can you explain why it is not t

Re: [FFmpeg-devel] [PATCH 3/3 v3] h264: Run VLC init under pthread_once

2015-10-07 Thread Hendrik Leppkes
On Wed, Oct 7, 2015 at 10:18 PM, Michael Niedermayer wrote: > On Wed, Oct 07, 2015 at 12:28:51PM -0400, Derek Buitenhuis wrote: >> This makes the h.264 decoder threadsafe to initialize. > > can you explain why it is not threadsafe currently ? > (assuming "done = 1" would be moved to the end of > f

Re: [FFmpeg-devel] [PATCH 3/3 v3] h264: Run VLC init under pthread_once

2015-10-07 Thread Michael Niedermayer
On Wed, Oct 07, 2015 at 12:28:51PM -0400, Derek Buitenhuis wrote: > This makes the h.264 decoder threadsafe to initialize. can you explain why it is not threadsafe currently ? (assuming "done = 1" would be moved to the end of ff_h264_decode_init_vlc()) [...] -- Michael GnuPG fingerprint: 9FF

[FFmpeg-devel] [PATCH 3/3 v3] h264: Run VLC init under pthread_once

2015-10-07 Thread Derek Buitenhuis
This makes the h.264 decoder threadsafe to initialize. Signed-off-by: Derek Buitenhuis --- libavcodec/h264.c | 9 - libavcodec/h264.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 3209c9c..1abdc4b 100644 --- a/libavcodec/