[vlc-devel] commit: mozilla: call libvlc_playlist_items_count() with playlist lock held . (Jean-Paul Saman )
git version control
git at videolan.org
Mon Feb 9 09:45:24 CET 2009
vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Mon Feb 9 09:42:07 2009 +0100| [b9dfd94693317fec3df66bd418b90777db8b8a93] | committer: Jean-Paul Saman
mozilla: call libvlc_playlist_items_count() with playlist lock held.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9dfd94693317fec3df66bd418b90777db8b8a93
---
projects/mozilla/control/npolibvlc.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/projects/mozilla/control/npolibvlc.cpp b/projects/mozilla/control/npolibvlc.cpp
index 516bb8b..2b43d67 100644
--- a/projects/mozilla/control/npolibvlc.cpp
+++ b/projects/mozilla/control/npolibvlc.cpp
@@ -1207,7 +1207,9 @@ RuntimeNPObject::InvokeResult LibvlcPlaylistItemsNPObject::getProperty(int index
{
case ID_playlistitems_count:
{
+ libvlc_playlist_lock(p_plugin->getVLC());
int val = libvlc_playlist_items_count(p_plugin->getVLC(), &ex);
+ libvlc_playlist_unlock(p_plugin->getVLC());
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
@@ -1332,7 +1334,9 @@ RuntimeNPObject::InvokeResult LibvlcPlaylistNPObject::getProperty(int index, NPV
{
case ID_playlist_itemcount: /* deprecated */
{
+ libvlc_playlist_lock(p_plugin->getVLC());
int val = libvlc_playlist_items_count(p_plugin->getVLC(), &ex);
+ libvlc_playlist_unlock(p_plugin->getVLC());
if( libvlc_exception_raised(&ex) )
{
NPN_SetException(this, libvlc_exception_get_message(&ex));
More information about the vlc-devel
mailing list