Original commit message from CVS:
* gst/parse/grammar.y:
Fix a leak in parse-launch for any source-or-sink named element
references used.
* tests/check/pipelines/parse-launch.c: (expected_fail_pipe):
Unref the pipeline if it exists after we've failed parsing.
+2006-04-06 Michael Smith <msmith@fluendo.com>
+
+ * gst/parse/grammar.y:
+ Fix a leak in parse-launch for any source-or-sink named element
+ references used.
+
+ * tests/check/pipelines/parse-launch.c: (expected_fail_pipe):
+ Unref the pipeline if it exists after we've failed parsing.
+
2006-04-05 Michael Smith <msmith@fluendo.com>
* gst/gstpipeline.c: (gst_pipeline_init):
-Subproject commit cbedff4d5f090d43fdeaa189748a6651f2c6a07f
+Subproject commit 623fe1c2cce45bc30d5823c05716349874ae994e
if (l->src_name) {
if (bin) {
l->src = gst_bin_get_by_name_recurse_up (bin, l->src_name);
+ if (l->src)
+ gst_object_unref (l->src);
} else {
l->src = strcmp (GST_ELEMENT_NAME (ret), l->src_name) == 0 ? ret : NULL;
}
if (l->sink_name) {
if (bin) {
l->sink = gst_bin_get_by_name_recurse_up (bin, l->sink_name);
+ if (l->sink)
+ gst_object_unref (l->sink);
} else {
l->sink = strcmp (GST_ELEMENT_NAME (ret), l->sink_name) == 0 ? ret : NULL;
}
pipeline = gst_parse_launch (pipe_descr, &error);
fail_unless (error != NULL, "Expected failure pipeline %s: succeeded!");
g_error_free (error);
+
+ /* We get a pipeline back even when parsing has failed, sometimes! */
+ if (pipeline)
+ gst_object_unref (pipeline);
}
static void