validate: fix a bunch of GstBus leaks

This commit is contained in:
Guillaume Desmottes 2015-03-20 15:22:32 +01:00
parent c23bac2912
commit 81a33d5f6a
3 changed files with 6 additions and 1 deletions

View file

@ -549,8 +549,11 @@ check_playback_scenario (GstValidateMediaInfo * mi,
}
if (configure_function) {
if (!configure_function (mi, playbin, error_message))
if (!configure_function (mi, playbin, error_message)) {
gst_object_unref (bus);
gst_object_unref (playbin);
return FALSE;
}
}
if (gst_element_set_state (playbin,

View file

@ -638,6 +638,7 @@ _execute_stop (GstValidateScenario * scenario, GstValidateAction * action)
gst_bus_post (bus,
gst_message_new_request_state (GST_OBJECT_CAST (scenario),
GST_STATE_NULL));
gst_object_unref (bus);
return TRUE;
}

View file

@ -495,6 +495,7 @@ _run_frame_analisis (GstMediaDescriptorWriter * writer,
writer->priv->pipeline = NULL;
g_main_loop_unref (writer->priv->loop);
writer->priv->loop = NULL;
gst_object_unref (bus);
return TRUE;
}