don't delete uninitialized m_eventHandler pointer if initialization failed (patch 1819944)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -959,7 +959,8 @@ void wxGStreamerMediaEventHandler::OnMediaFinish(wxMediaEvent& WXUNUSED(event))
|
|||||||
// Sets m_playbin to NULL signifying we havn't loaded anything yet
|
// Sets m_playbin to NULL signifying we havn't loaded anything yet
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
wxGStreamerMediaBackend::wxGStreamerMediaBackend()
|
wxGStreamerMediaBackend::wxGStreamerMediaBackend()
|
||||||
: m_playbin(NULL)
|
: m_playbin(NULL),
|
||||||
|
m_eventHandler(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1084,12 +1085,12 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
|
|||||||
// Create our playbin object
|
// Create our playbin object
|
||||||
m_playbin = gst_element_factory_make ("playbin", "play");
|
m_playbin = gst_element_factory_make ("playbin", "play");
|
||||||
if (!GST_IS_ELEMENT(m_playbin))
|
if (!GST_IS_ELEMENT(m_playbin))
|
||||||
{
|
{
|
||||||
if(G_IS_OBJECT(m_playbin))
|
if(G_IS_OBJECT(m_playbin))
|
||||||
g_object_unref(m_playbin);
|
g_object_unref(m_playbin);
|
||||||
wxLogSysError(wxT("Got an invalid playbin"));
|
wxLogSysError(wxT("Got an invalid playbin"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10
|
#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10
|
||||||
// Connect the glib events/callbacks we want to our playbin
|
// Connect the glib events/callbacks we want to our playbin
|
||||||
@@ -1125,7 +1126,7 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
|
|||||||
if( !TryAudioSink(audiosink) )
|
if( !TryAudioSink(audiosink) )
|
||||||
{
|
{
|
||||||
wxLogSysError(wxT("Could not find a valid audiosink"));
|
wxLogSysError(wxT("Could not find a valid audiosink"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1150,7 +1151,7 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
|
|||||||
g_object_unref(audiosink);
|
g_object_unref(audiosink);
|
||||||
wxLogSysError(wxT("Could not find a suitable video sink"));
|
wxLogSysError(wxT("Could not find a suitable video sink"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user