On Wed, Oct 7, 2015 at 10:18 PM, Michael Niedermayer <mich...@niedermayer.cc> 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 > ff_h264_decode_init_vlc()) >
Validating that a complex init function doesn't produce intermittently incoherent states on all platforms (were reads/writes are not necessarily atomic) is no easy feat. Global init should be protected and only run once to avoid any and all unforseen issues. Right now its protected by the lock in avcodec - but if we want to get rid of that to avoid contention issues, we need new protection. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel