mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gst/: More guards against bad input; typo fix; some minor clean-ups.
Original commit message from CVS: * gst/gstparse.c: (_gst_parse_escape), (gst_parse_launchv): * gst/gstutils.c: (gst_parse_bin_from_description): * gst/parse/grammar.y: (graph): More guards against bad input; typo fix; some minor clean-ups.
This commit is contained in:
parent
98faaeb7f4
commit
479a58ebfe
4 changed files with 13 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-05-22 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||
|
||||
* gst/gstparse.c: (_gst_parse_escape), (gst_parse_launchv):
|
||||
* gst/gstutils.c: (gst_parse_bin_from_description):
|
||||
* gst/parse/grammar.y: (graph):
|
||||
More guards against bad input; typo fix; some minor clean-ups.
|
||||
|
||||
2008-05-22 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
Patch by: Sjoerd Simons <sjoerd at luon dot net>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @short_description: Get a pipeline from a text pipeline description
|
||||
*
|
||||
* These function allow to create a pipeline based on the syntax used in the
|
||||
* gst-launch utillity.
|
||||
* gst-launch utility.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -61,7 +61,6 @@ static gchar *
|
|||
_gst_parse_escape (const gchar * str)
|
||||
{
|
||||
GString *gstr = NULL;
|
||||
gchar *newstr = NULL;
|
||||
|
||||
g_return_val_if_fail (str != NULL, NULL);
|
||||
|
||||
|
@ -74,10 +73,7 @@ _gst_parse_escape (const gchar * str)
|
|||
str++;
|
||||
}
|
||||
|
||||
newstr = gstr->str;
|
||||
g_string_free (gstr, FALSE);
|
||||
|
||||
return newstr;
|
||||
return g_string_free (gstr, FALSE);
|
||||
}
|
||||
#endif /* !GST_DISABLE_PARSE */
|
||||
|
||||
|
@ -102,6 +98,7 @@ gst_parse_launchv (const gchar ** argv, GError ** error)
|
|||
gchar *tmp;
|
||||
|
||||
g_return_val_if_fail (argv != NULL, NULL);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
||||
|
||||
/* let's give it a nice size. */
|
||||
str = g_string_sized_new (1024);
|
||||
|
@ -124,7 +121,7 @@ gst_parse_launchv (const gchar ** argv, GError ** error)
|
|||
#else
|
||||
gchar *msg;
|
||||
|
||||
GST_WARNING ("Disabled API called: gst_parse_launchv()");
|
||||
GST_WARNING ("Disabled API called");
|
||||
|
||||
msg = gst_error_get_message (GST_CORE_ERROR, GST_CORE_ERROR_DISABLED);
|
||||
g_set_error (error, GST_CORE_ERROR, GST_CORE_ERROR_DISABLED, "%s", msg);
|
||||
|
|
|
@ -3377,7 +3377,7 @@ gst_parse_bin_from_description (const gchar * bin_description,
|
|||
#else
|
||||
gchar *msg;
|
||||
|
||||
GST_WARNING ("Disabled API called: gst_parse_bin_from_description()");
|
||||
GST_WARNING ("Disabled API called");
|
||||
|
||||
msg = gst_error_get_message (GST_CORE_ERROR, GST_CORE_ERROR_DISABLED);
|
||||
g_set_error (err, GST_CORE_ERROR, GST_CORE_ERROR_DISABLED, "%s", msg);
|
||||
|
|
|
@ -794,6 +794,7 @@ _gst_parse_launch (const gchar *str, GError **error)
|
|||
yyscan_t scanner;
|
||||
|
||||
g_return_val_if_fail (str != NULL, NULL);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
||||
|
||||
g.chain = NULL;
|
||||
g.links = NULL;
|
||||
|
|
Loading…
Reference in a new issue