From 2444ba9601d28376d604a75d5d41c212cdd860d4 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 26 Jul 2006 06:18:44 +0000 Subject: [PATCH] tools/gst-launch.c: If the top-level of the parse is a normal bin, it doesn't do the right logic to run as a top-leve... Original commit message from CVS: * tools/gst-launch.c: (main): If the top-level of the parse is a normal bin, it doesn't do the right logic to run as a top-level element, so place it inside a pipeline. --- ChangeLog | 7 +++++++ tools/gst-launch.c | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6b16dd1..1f5b707 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-07-26 Jan Schmidt + + * tools/gst-launch.c: (main): + If the top-level of the parse is a normal bin, it doesn't do the + right logic to run as a top-level element, so place it inside a + pipeline. + 2006-07-25 Tim-Philipp Müller * plugins/elements/gstfilesrc.c: (gst_file_src_set_property): diff --git a/tools/gst-launch.c b/tools/gst-launch.c index 4776e70..355e673 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -637,7 +637,10 @@ main (int argc, char *argv[]) GstState state, pending; GstStateChangeReturn ret; - if (!GST_IS_BIN (pipeline)) { + /* If the top-level object is not a bin, or is just a normal bin that + * doesn't do top-level type logic, place it in a pipeline. Assumes any + * other top-level bin is a special kind (like playbin) */ + if (!GST_IS_BIN (pipeline) || (G_OBJECT_TYPE (pipeline) == GST_TYPE_BIN)) { GstElement *real_pipeline = gst_element_factory_make ("pipeline", NULL); if (real_pipeline == NULL) { -- 2.7.4