]> git.sesse.net Git - vlc/commitdiff
mozilla: stop playing on page reload and when already playing
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Fri, 12 Mar 2010 12:07:26 +0000 (13:07 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Thu, 18 Mar 2010 10:16:03 +0000 (11:16 +0100)
projects/mozilla/vlcplugin.cpp
projects/mozilla/vlcplugin.h

index bdcc2e768972888ddb94052e7f72f83134692aa6..41ecab27039f6d82a73602c51797c485a941cac1 100644 (file)
@@ -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 );
     }
index a14007fcd6e54339bc8a904cae3c3b70204f7127..754118bb851a0e6a43ea427fcc1a7f9f46e8e09b 100644 (file)
@@ -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);
     }