[vlc-devel] modules/codec/avcodec/avutil.h
Laurent Aimar
fenrir at elivagar.org
Wed Jan 4 13:42:36 CET 2012
On Wed, Jan 04, 2012 at 07:36:25PM +0700, Sergey Radionov wrote:
> 2012/1/4 Rémi Denis-Courmont <remi at remlab.net>:
> > On Wed, 4 Jan 2012 18:35:27 +0700, Sergey Radionov <rsatom at gmail.com>
> > wrote:
> >> 2012/1/4 Rémi Denis-Courmont <remi at remlab.net>:
> >>> On Wed, 4 Jan 2012 18:14:42 +0700, Sergey Radionov <rsatom at gmail.com>
> >>> wrote:
> >>>>> IIRC, the opaque pointer was not set at all the cases outlined by the
> >>>>> commit log.
> >>>> Then why you just don't check !=NULL ?
> >>>
> >>> That would obviously not be thread-safe.
> >> do you assume "opaque" can be changed in any time in any thread? not
> >> only at libav initialization?
> >
> > I don't assume anything.
>
> then why you think "opaque" checking will be not thread safe?
Someone has to call av_log_set_callback() with a valid object (and one that
stay valid until no one is using libav* anymore).
One of the issue is that av_log_set_callback() is per process, and in VLC
multiple threads can use/instantiate libav*
--
fenrir
More information about the vlc-devel
mailing list