[vlc-devel] commit: video_filter_rotate: fix race condition. ( Rémi Duraffort )
    Rémi Denis-Courmont 
    rem at videolan.org
       
    Mon Dec 28 18:44:43 CET 2009
    
    
  
Le lundi 28 décembre 2009, git version control a écrit :
> @@ -183,8 +181,8 @@ static picture_t *Filter( filter_t *p_filter,
> picture_t *p_pic ) }
>
>      vlc_spin_lock( &p_sys->lock );
> -    i_sin = p_sys->i_sin;
> -    i_cos = p_sys->i_cos;
> +    const int i_sin = p_sys->i_sin;
> +    const int i_cos = p_sys->i_cos;
>      vlc_spin_unlock( &p_sys->lock );
I would rather declare the variable outside of the lock, especially a 
spin lock. For all I know, this might save one or a few needlessly 
contentious opcodes.
-- 
Rémi Denis-Courmont
http://www.remlab.net/
    
    
More information about the vlc-devel
mailing list