[vlc-devel] commit: activex: take lock before accessing libvlc_playlist_items_count(). (Jean-Paul Saman )

Anthony Loiseau thannoy at actech-innovation.com
Wed Feb 11 11:39:09 CET 2009


Hi,

This commit break my activex compilation due to "&ex" usage (undefined).
Attached is a patch proposal to fix it.

regards,
Anthony

On Wed, 2009-02-11 at 09:52 +0100, git version control wrote:
> vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Wed Feb 11 09:45:52 2009 +0100| [e166ec152cd4f5add7d40b92d3ad59ca23675e77] | committer: Jean-Paul Saman 
> 
> activex: take lock before accessing libvlc_playlist_items_count().
> 
> Patch by jan-paul dinger (jpd at m2x dot nl).
> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e166ec152cd4f5add7d40b92d3ad59ca23675e77
> [...]
>  
> -        if( _b_autoplay & (libvlc_playlist_items_count(p_libvlc, NULL) > 0) )
> +        if( _b_autoplay )
>          {
> -            libvlc_playlist_play(p_libvlc, 0, 0, NULL, NULL);
> -            fireOnPlayEvent();
> +            libvlc_playlist_lock(p_libvlc);
> +            unsigned count = libvlc_playlist_items_count(p_libvlc, &ex);
> +            if( count > 0 )
> +            {
> +              libvlc_playlist_play(p_libvlc, 0, 0, NULL, NULL);
> +              fireOnPlayEvent();
> +            }
> +            libvlc_playlist_unlock(p_libvlc);
>          }
>      }
>  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-activex-create-ex-before-using-this-exception-var.patch
Type: text/x-patch
Size: 1331 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090211/487c5da1/attachment.bin>


More information about the vlc-devel mailing list