fixed problems with -launch

Original commit message from CVS:
fixed problems with -launch
This commit is contained in:
Erik Walthinsen 2001-01-04 20:34:39 +00:00
parent f068579abd
commit ddfc781f7d

View file

@ -150,15 +150,14 @@ gint parse_cmdline(int argc,char *argv[],GstBin *parent) {
gchar * argval;
gchar * pos = strstr(arg, "=");
// we have an argument
argname = g_strndup(arg, pos - arg);
argname = arg;
pos[0] = '\0';
argval = pos+1;
DEBUG("attempting to set argument '%s'\n", arg);
DEBUG("attempting to set argument '%s' to '%s' on element '%s'\n",
argname,argval,gst_element_get_name(previous));
gtk_object_set(GTK_OBJECT(previous),argname,argval,NULL);
g_free(argname);
i++;
continue;
// element or argument, or beginning of bin or thread
} else {
DEBUG("have element or bin/thread\n");
@ -231,11 +230,12 @@ gint parse_cmdline(int argc,char *argv[],GstBin *parent) {
}
}
}
previous = element;
if (!GST_IS_BIN(element)) prevelement = element;
}
i++;
previous = element;
if (!GST_IS_BIN(element)) prevelement = element;
}
// ghost all the src pads of the bin