mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
parsing returns elements, not bins - so put it into a pipeline if it's not a bin
Original commit message from CVS: parsing returns elements, not bins - so put it into a pipeline if it's not a bin
This commit is contained in:
parent
91d22b150d
commit
7c9480e220
1 changed files with 10 additions and 1 deletions
|
@ -323,6 +323,16 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
if (!savefile) {
|
if (!savefile) {
|
||||||
|
|
||||||
|
if (!GST_IS_BIN (pipeline)) {
|
||||||
|
GstElement *real_pipeline = gst_element_factory_make ("pipeline", NULL);
|
||||||
|
if (real_pipeline == NULL) {
|
||||||
|
fprintf(stderr, "ERROR: The pipeline element wasn't found.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
gst_bin_add (GST_BIN (real_pipeline), pipeline);
|
||||||
|
pipeline = real_pipeline;
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(stderr,"RUNNING pipeline\n");
|
fprintf(stderr,"RUNNING pipeline\n");
|
||||||
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) == GST_STATE_FAILURE) {
|
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) == GST_STATE_FAILURE) {
|
||||||
fprintf(stderr,"pipeline doesn't want to play\n");
|
fprintf(stderr,"pipeline doesn't want to play\n");
|
||||||
|
@ -353,4 +363,3 @@ end:
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue