[FFmpeg-devel] [PATCH 2/5] lavc: replace and deprecate the lock manager

wm4 nfxjfg at googlemail.com
Sat Dec 23 03:33:01 EET 2017


On Sat, 23 Dec 2017 02:25:11 +0100
Michael Niedermayer <michael at niedermayer.cc> wrote:

> On Thu, Dec 21, 2017 at 11:22:21PM +0100, wm4 wrote:
> > Use static mutexes instead of requiring a lock manager. The behavior
> > should be roughly the same before and after this change for API users
> > which did not set the lock manager at all (except that a minor memory
> > leak disappears).
> > ---
> >  doc/APIchanges       |   5 +++
> >  libavcodec/avcodec.h |   8 +++-
> >  libavcodec/utils.c   | 107 +++++----------------------------------------------
> >  libavcodec/version.h |   5 ++-
> >  4 files changed, 26 insertions(+), 99 deletions(-)  
> 
> This fails to build with:
> make distclean ; ./configure --disable-pthreads && make -j12 
> 
> libavcodec/utils.c:72:38: error: ‘PTHREAD_MUTEX_INITIALIZER’ undeclared here (not in a function)
>  static pthread_mutex_t codec_mutex = PTHREAD_MUTEX_INITIALIZER;
> 
> [...]

Will fix locally by using our pthread aliases instead of
pthread names directly (ff_mutex_lock() etc.), and I'll define
PTHREAD_MUTEX_INITIALIZER as AV_MUTEX_INITIALIZER.


More information about the ffmpeg-devel mailing list