[vlc-devel] [PATCH] Vovoid VSXu audio visualization integration

Rémi Denis-Courmont remi at remlab.net
Sat Mar 17 09:21:06 CET 2012


Le vendredi 16 mars 2012 23:16:07 Jonatan Wallmander, vous avez écrit :
> On 03/16/2012 09:55 PM, Rémi Denis-Courmont wrote:
> > Le vendredi 16 mars 2012 22:52:47 Jonatan Wallmander, vous avez écrit :
> >> On 03/16/2012 09:58 AM, Rémi Denis-Courmont wrote:
> >>> A few variables in p_sys could probably be local to the thread
> >>> function. Also I think putting the thread cleanup code in place of
> >>> abort() would be more legible.
> >>> 
> >>> But I have no functional objections.
> >> 
> >> Here is a new patch. I have fixed up a lot of stuff and cleaned up the
> >> code.. A whole bunch of unnecessary variables were removed and the flow
> >> should be easier to read now.
> > 
> > Right.
> > 
> > You don't need to call vlc_savecancel(), since you never call
> > vlc_cancel().
> 
> Ok!

+        vlc_mutex_lock( &p_sys->lock );
+            if( p_sys->b_quit )
+            {
+                vlc_mutex_unlock( &p_sys->lock );
+                run = false;
+            }
+        vlc_mutex_unlock( &p_sys->lock );

Unlocking a mutex twice is not defined. In debug build, it will abort.

In this case, an atomic variable may be easier.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list