[vlc-devel] commit: Fixed exiting skins when there is no video. ( Olivier Teulière )

git version control git at videolan.org
Mon Aug 11 21:06:10 CEST 2008


vlc | branch: master | Olivier Teulière <ipkiss at ulukai.(none)> | Mon Aug 11 21:03:24 2008 +0200| [0d5db2b480afaff6141bb90b47856018a6e8576c] | committer: Olivier Teulière 

Fixed exiting skins when there is no video.
Exiting still hangs if there is a video output.

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

 modules/gui/skins2/commands/cmd_quit.cpp |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/modules/gui/skins2/commands/cmd_quit.cpp b/modules/gui/skins2/commands/cmd_quit.cpp
index 94f82da..74cd7ed 100644
--- a/modules/gui/skins2/commands/cmd_quit.cpp
+++ b/modules/gui/skins2/commands/cmd_quit.cpp
@@ -22,6 +22,13 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+#   include "config.h"
+#endif
+
+#include <vlc_osd.h>
+#include <vlc_playlist.h>
+
 #include "cmd_quit.hpp"
 #include "../src/os_factory.hpp"
 #include "../src/os_loop.hpp"
@@ -29,9 +36,16 @@
 
 void CmdQuit::execute()
 {
+    // Stop the playlist
+    vout_OSDMessage( getIntf(), DEFAULT_CHAN, _( "Quit" ) );
+    playlist_Stop( getIntf()->p_sys->p_playlist );
+
     // Get the instance of OSFactory
     OSFactory *pOsFactory = OSFactory::instance( getIntf() );
 
     // Exit the main OS loop
     pOsFactory->getOSLoop()->exit();
+
+    // Kill libvlc
+    vlc_object_kill( getIntf()->p_libvlc );
 }




More information about the vlc-devel mailing list