mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
uri-asset: do not reuse a passed GError pointer
Summary: A passed GError is re-allocated when discoverer has no information. Reviewers: thiblahute Projects: #gstreamer_editing_services Reviewed By: thiblahute Differential Revision: https://phabricator.freedesktop.org/D302
This commit is contained in:
parent
0defd9a893
commit
46f9cbdf4f
2 changed files with 16 additions and 6 deletions
|
@ -1,3 +1,5 @@
|
||||||
{
|
{
|
||||||
"phabricator.uri" : "https:\/\/phabricator.freedesktop.org\/api\/"
|
"phabricator.uri" : "https:\/\/phabricator.freedesktop.org\/api\/",
|
||||||
|
"repository.callsign" : "GES",
|
||||||
|
"project": "GStreamer Editing Services"
|
||||||
}
|
}
|
||||||
|
|
|
@ -344,6 +344,7 @@ static void
|
||||||
discoverer_discovered_cb (GstDiscoverer * discoverer,
|
discoverer_discovered_cb (GstDiscoverer * discoverer,
|
||||||
GstDiscovererInfo * info, GError * err, gpointer user_data)
|
GstDiscovererInfo * info, GError * err, gpointer user_data)
|
||||||
{
|
{
|
||||||
|
GError *error = NULL;
|
||||||
const GstTagList *tags;
|
const GstTagList *tags;
|
||||||
|
|
||||||
const gchar *uri = gst_discoverer_info_get_uri (info);
|
const gchar *uri = gst_discoverer_info_get_uri (info);
|
||||||
|
@ -356,13 +357,20 @@ discoverer_discovered_cb (GstDiscoverer * discoverer,
|
||||||
|
|
||||||
if (gst_discoverer_info_get_result (info) == GST_DISCOVERER_OK) {
|
if (gst_discoverer_info_get_result (info) == GST_DISCOVERER_OK) {
|
||||||
ges_uri_clip_asset_set_info (mfs, info);
|
ges_uri_clip_asset_set_info (mfs, info);
|
||||||
} else if (!err) {
|
} else {
|
||||||
err = g_error_new (GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED,
|
if (err) {
|
||||||
"Stream %s discovering failed (error code: %d)",
|
error = g_error_copy (err);
|
||||||
uri, gst_discoverer_info_get_result (info));
|
} else {
|
||||||
|
error = g_error_new (GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED,
|
||||||
|
"Stream %s discovering failed (error code: %d)",
|
||||||
|
uri, gst_discoverer_info_get_result (info));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ges_asset_cache_set_loaded (GES_TYPE_URI_CLIP, uri, err);
|
ges_asset_cache_set_loaded (GES_TYPE_URI_CLIP, uri, error);
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* API implementation */
|
/* API implementation */
|
||||||
|
|
Loading…
Reference in a new issue