mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 04:05:34 +00:00
discoverer: Allow GError* argument to be NULL
This is how other methods taking GError* arguments behave. Fixes #652838
This commit is contained in:
parent
4af771a1a5
commit
b2b1a7be1b
1 changed files with 7 additions and 5 deletions
|
@ -1441,7 +1441,7 @@ gst_discoverer_discover_uri_async (GstDiscoverer * discoverer,
|
||||||
* gst_discoverer_discover_uri:
|
* gst_discoverer_discover_uri:
|
||||||
* @discoverer: A #GstDiscoverer
|
* @discoverer: A #GstDiscoverer
|
||||||
* @uri: The URI to run on.
|
* @uri: The URI to run on.
|
||||||
* @err: If an error occurred, this field will be filled in.
|
* @err: (out) (allow-none): If an error occurred, this field will be filled in.
|
||||||
*
|
*
|
||||||
* Synchronously discovers the given @uri.
|
* Synchronously discovers the given @uri.
|
||||||
*
|
*
|
||||||
|
@ -1477,10 +1477,12 @@ gst_discoverer_discover_uri (GstDiscoverer * discoverer, const gchar * uri,
|
||||||
discoverer_collect (discoverer);
|
discoverer_collect (discoverer);
|
||||||
|
|
||||||
/* Get results */
|
/* Get results */
|
||||||
if (discoverer->priv->current_error)
|
if (err) {
|
||||||
*err = g_error_copy (discoverer->priv->current_error);
|
if (discoverer->priv->current_error)
|
||||||
else
|
*err = g_error_copy (discoverer->priv->current_error);
|
||||||
*err = NULL;
|
else
|
||||||
|
*err = NULL;
|
||||||
|
}
|
||||||
if (res != GST_DISCOVERER_OK) {
|
if (res != GST_DISCOVERER_OK) {
|
||||||
GST_DEBUG ("Setting result to %d (was %d)", res,
|
GST_DEBUG ("Setting result to %d (was %d)", res,
|
||||||
discoverer->priv->current_info->result);
|
discoverer->priv->current_info->result);
|
||||||
|
|
Loading…
Reference in a new issue