From f5e46974ef292b01943d4970c4531ce047a3ea77 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 9 Dec 2001 14:44:48 +0000 Subject: [PATCH] Set the pipeline to the paused state when doing dynimic connects. Original commit message from CVS: Set the pipeline to the paused state when doing dynimic connects. --- gst/gstparse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/gstparse.c b/gst/gstparse.c index bf8ffd7ea6..8b6ece39a6 100644 --- a/gst/gstparse.c +++ b/gst/gstparse.c @@ -67,6 +67,7 @@ gst_parse_newpad(GstElement *element,GstPad *pad,launch_delayed_pad *peer) typedef struct { gchar *srcpadname; GstPad *target; + GstElement *pipeline; } dyn_connect; static void have_eos (void) @@ -81,7 +82,9 @@ dynamic_connect (GstElement *element, GstPad *newpad, gpointer data) dyn_connect *connect = (dyn_connect *)data; if (!strcmp (gst_pad_get_name (newpad), connect->srcpadname)) { + gst_element_set_state (connect->pipeline, GST_STATE_PAUSED); gst_pad_connect (newpad, connect->target); + gst_element_set_state (connect->pipeline, GST_STATE_PLAYING); } } @@ -375,6 +378,7 @@ gst_parse_launch_cmdline(int argc,char *argv[],GstBin *parent,gst_parse_priv *pr connect->srcpadname = srcpadname; connect->target = GST_PARSE_LISTPAD(sinkpads); + connect->pipeline = parent; GST_DEBUG(0,"SETTING UP dynamic connection %s:%s and %s:%s\n", gst_element_get_name (previous),