]> git.saurik.com Git - wxWidgets.git/commitdiff
free old resources in DoLoad(), apparently fixes memory leaks with gstreamer 0.10...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 17 Nov 2006 18:25:15 +0000 (18:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 17 Nov 2006 18:25:15 +0000 (18:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/mediactrl.cpp

index 6a0f4d478697d47a309cf7c8b097ceb6a3a3329a..8a549b75bbdc65139a3f0e2394ea70d181f3ae2a 100644 (file)
@@ -1236,6 +1236,9 @@ bool wxGStreamerMediaBackend::DoLoad(const wxString& locstring)
             return false;
     }
 
+    // free current media resources
+    gst_element_set_state (m_playbin, GST_STATE_NULL);
+
     // Make sure the passed URI is valid and tell playbin to load it
     // non-file uris are encoded
     wxASSERT(gst_uri_protocol_is_valid("file"));