From 92f20fe33dd4f783a409a2c7960fb28392cf718b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 17 Nov 2006 18:25:15 +0000 Subject: [PATCH] free old resources in DoLoad(), apparently fixes memory leaks with gstreamer 0.10 (patch 1598317) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/mediactrl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/unix/mediactrl.cpp b/src/unix/mediactrl.cpp index 6a0f4d4786..8a549b75bb 100644 --- a/src/unix/mediactrl.cpp +++ b/src/unix/mediactrl.cpp @@ -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")); -- 2.45.2