[vlc-devel] commit: i_verbose has been privatized ( Rafaël Carré )

Remi Denis-Courmont rdenis at simphalempin.com
Mon May 5 16:02:30 CEST 2008


On Mon, 5 May 2008 14:12:38 +0200, "Rafaël Carré" <funman at videolan.org>
wrote:
> 2008/5/5 Remi Denis-Courmont <rdenis at simphalempin.com>:
>>
>>  > *p_instance, unsigned level, li
>>  >  {
>>  >      if( p_instance )
>>  >      {
>>  > -        p_instance->p_libvlc_int->i_verbose = level;
>>  > +        libvlc_priv_t *p_priv = libvlc_priv(
> p_instance->p_libvlc_int );
>>  > +        p_priv->i_verbose = level;
>>  >      }
>>  >      else
>>  >          RAISEVOID("Invalid VLC instance!");
>>
>>  This cannot be right. Reading i_verbose is ugly, but OK.
>>  Writing i_verbose after any thread has started is _wrong_.
> 
> My opinion is: why do these functions exist in the 1st place ?

Yeah, one can customize the verbosity through libvlc_new "command line"
options, without such race conditions.

Unfortunately, it turns out there are still some verbosity users in
modules/. I killed the LUA use-case (which seemed bogus, but you never
know), but it turned out the logger plugin uses it too.

-- 
Rémi Denis-Courmont
http://www.remlab.net




More information about the vlc-devel mailing list