mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-09 10:59:39 +00:00
gst-validate: ensure the top level element is a pipeline
For instance, "fakesrc" will return a fakesrc, not a pipeline. This is similar to what gst-launch does, and avoids calling pipeline API on a non pipeline object (and thus asserting).
This commit is contained in:
parent
9cf4857776
commit
7223b183f3
1 changed files with 5 additions and 0 deletions
|
@ -168,6 +168,11 @@ main (int argc, gchar ** argv)
|
|||
err ? err->message : "unknown reason");
|
||||
exit (1);
|
||||
}
|
||||
if (!GST_IS_PIPELINE (pipeline)) {
|
||||
GstElement *new_pipeline = gst_pipeline_new ("");
|
||||
gst_bin_add (GST_BIN (new_pipeline), pipeline);
|
||||
pipeline = new_pipeline;
|
||||
}
|
||||
#ifdef G_OS_UNIX
|
||||
signal_watch_id =
|
||||
g_unix_signal_add (SIGINT, (GSourceFunc) intr_handler, pipeline);
|
||||
|
|
Loading…
Reference in a new issue