[vlc-commits] commit: mozilla: stop playing on page reload and when already playing ( Jean-Paul Saman )

git at videolan.org git at videolan.org
Thu Mar 18 11:19:15 CET 2010


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Fri Mar 12 13:07:26 2010 +0100| [b57a963bfa5a39c42d672fd81af67a0cd2454ade] | committer: Jean-Paul Saman 

mozilla: stop playing on page reload and when already playing

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b57a963bfa5a39c42d672fd81af67a0cd2454ade
---

 projects/mozilla/vlcplugin.cpp |    2 ++
 projects/mozilla/vlcplugin.h   |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/projects/mozilla/vlcplugin.cpp b/projects/mozilla/vlcplugin.cpp
index bdcc2e7..41ecab2 100644
--- a/projects/mozilla/vlcplugin.cpp
+++ b/projects/mozilla/vlcplugin.cpp
@@ -495,6 +495,8 @@ VlcPlugin::~VlcPlugin()
 
     if( libvlc_media_player )
     {
+        if( playlist_isplaying() )
+            playlist_stop();
         events.unhook_manager();
         libvlc_media_player_release( libvlc_media_player );
     }
diff --git a/projects/mozilla/vlcplugin.h b/projects/mozilla/vlcplugin.h
index a14007f..754118b 100644
--- a/projects/mozilla/vlcplugin.h
+++ b/projects/mozilla/vlcplugin.h
@@ -237,6 +237,8 @@ public:
 
     void playlist_play()
     {
+        if( playlist_isplaying() )
+            playlist_stop();
         if( libvlc_media_player||playlist_select(0) )
             libvlc_media_player_play(libvlc_media_player);
     }



More information about the vlc-commits mailing list