1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-02-06 06:03:23 +01:00

Fix a small memory leak

This commit is contained in:
David Sansome 2010-06-08 12:12:47 +00:00
parent 5099503b45
commit 08dddac981
2 changed files with 2 additions and 14 deletions

View File

@ -194,6 +194,8 @@ gboolean GstEnginePipeline::BusCallback(GstBus*, GstMessage* msg, gpointer self)
default:
break;
}
gst_message_unref(msg);
return GST_BUS_DROP;
}
@ -295,19 +297,6 @@ bool GstEnginePipeline::HandoffCallback(GstPad*, GstBuffer* buf, gpointer self)
return true;
}
void GstEnginePipeline::EventCallback(GstPad*, GstEvent* event, gpointer self) {
GstEnginePipeline* instance = reinterpret_cast<GstEnginePipeline*>(self);
switch(event->type) {
case GST_EVENT_EOS:
emit instance->EndOfStreamReached(false);
break;
default:
break;
}
}
void GstEnginePipeline::SourceDrainedCallback(GstURIDecodeBin* bin, gpointer self) {
GstEnginePipeline* instance = reinterpret_cast<GstEnginePipeline*>(self);

View File

@ -92,7 +92,6 @@ class GstEnginePipeline : public QObject {
static gboolean BusCallback(GstBus*, GstMessage*, gpointer);
static void NewPadCallback(GstElement*, GstPad*, gpointer);
static bool HandoffCallback(GstPad*, GstBuffer*, gpointer);
static void EventCallback(GstPad*, GstEvent*, gpointer);
static void SourceDrainedCallback(GstURIDecodeBin*, gpointer);
static bool StopUriDecodeBin(gpointer bin);
void TagMessageReceived(GstMessage*);