mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
add extra error for empty pipeline
Original commit message from CVS: add extra error for empty pipeline
This commit is contained in:
parent
775fbca9a5
commit
9837c9dbaa
2 changed files with 6 additions and 4 deletions
|
@ -40,6 +40,7 @@ typedef enum
|
|||
GST_PARSE_ERROR_LINK,
|
||||
GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
|
||||
GST_PARSE_ERROR_EMPTY_BIN,
|
||||
GST_PARSE_ERROR_EMPTY
|
||||
} GstParseError;
|
||||
|
||||
|
||||
|
|
|
@ -521,7 +521,6 @@ static int yyerror (const char *s);
|
|||
%type <e> element
|
||||
%type <p> padlist pads assignments
|
||||
|
||||
|
||||
%left '{' '}' '(' ')'
|
||||
%left ','
|
||||
%right '.'
|
||||
|
@ -580,7 +579,6 @@ reference: REF { MAKE_REF ($$, $1, NULL); }
|
|||
linkpart: reference { $$ = $1; }
|
||||
| pads { MAKE_REF ($$, NULL, $1); }
|
||||
| /* NOP */ { MAKE_REF ($$, NULL, NULL); }
|
||||
| linkpart error { $$ = $1; }
|
||||
;
|
||||
|
||||
link: linkpart '!' linkpart { $$ = $1;
|
||||
|
@ -594,7 +592,7 @@ linklist: link { $$ = g_slist_prepend (NULL, $1); }
|
|||
| link linklist { $$ = g_slist_prepend ($2, $1); }
|
||||
| linklist error { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
chain: element { $$ = gst_parse_chain_new ();
|
||||
$$->first = $$->last = $1;
|
||||
$$->front = $$->back = NULL;
|
||||
|
@ -688,7 +686,10 @@ chain: element { $$ = gst_parse_chain_new ();
|
|||
| chain error { $$ = $1; }
|
||||
;
|
||||
|
||||
graph: chain { $$ = (graph_t *) graph;
|
||||
graph: /* NOP */ { ERROR (GST_PARSE_ERROR_EMPTY, "Empty pipeline not allowed");
|
||||
$$ = (graph_t *) graph;
|
||||
}
|
||||
| chain { $$ = (graph_t *) graph;
|
||||
if ($1->front) {
|
||||
if (!$1->front->src_name) {
|
||||
ERROR (GST_PARSE_ERROR_LINK, "link without source element");
|
||||
|
|
Loading…
Reference in a new issue