X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8a5d614ca4d8abf5c933409be33ecd4216f5306..4215a4386e7bc781155d6809f052753c1f9a72b2:/src/unix/mediactrl.cpp diff --git a/src/unix/mediactrl.cpp b/src/unix/mediactrl.cpp index 6866709fb4..8a549b75bb 100644 --- a/src/unix/mediactrl.cpp +++ b/src/unix/mediactrl.cpp @@ -166,7 +166,7 @@ class WXDLLIMPEXP_MEDIA public: wxGStreamerMediaBackend(); - ~wxGStreamerMediaBackend(); + virtual ~wxGStreamerMediaBackend(); virtual bool CreateControl(wxControl* ctrl, wxWindow* parent, wxWindowID id, @@ -913,7 +913,7 @@ bool wxGStreamerMediaBackend::TryVideoSink(GstElement* videosink) // // Called when the media is about to stop //----------------------------------------------------------------------------- -void wxGStreamerMediaEventHandler::OnMediaFinish(wxMediaEvent& event) +void wxGStreamerMediaEventHandler::OnMediaFinish(wxMediaEvent& WXUNUSED(event)) { // (RN - I have no idea why I thought this was good behaviour.... // maybe it made sense for streaming/nonseeking data but @@ -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"));