[vlc-devel] commit: fix crash when switching phonon backends on the fly, remember to stop libvlc media player before releasing it (Martin T. H. Sandsmark )

git version control git at videolan.org
Fri Jan 15 15:56:44 CET 2010


vlc | branch: master | Martin T. H. Sandsmark <sandsmark at samfundet.no> | Thu Jan 14 21:22:56 2010 +0100| [70a5235e5c3f4a105d045488acb01890f363e4ed] | committer: Jean-Baptiste Kempf 

fix crash when switching phonon backends on the fly, remember to stop libvlc media player before releasing it

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 bindings/phonon/vlc/vlcmediaobject.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/bindings/phonon/vlc/vlcmediaobject.cpp b/bindings/phonon/vlc/vlcmediaobject.cpp
index 2097207..4e06f35 100644
--- a/bindings/phonon/vlc/vlcmediaobject.cpp
+++ b/bindings/phonon/vlc/vlcmediaobject.cpp
@@ -55,7 +55,9 @@ VLCMediaObject::VLCMediaObject(QObject * parent)
 
 VLCMediaObject::~VLCMediaObject()
 {
-//    unloadMedia();
+    unloadMedia();
+
+    libvlc_media_player_stop(p_vlc_media_player, vlc_exception); // ensure that we are stopped
     libvlc_media_player_release(p_vlc_media_player);
 }
 




More information about the vlc-devel mailing list