mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 15:32:32 +00:00
ges: Raise an error when the discoverer returns != RESULT_OK
And do not try to run the pipeline when that happens
This commit is contained in:
parent
4f83cde172
commit
321d2c2edd
2 changed files with 9 additions and 3 deletions
|
@ -354,8 +354,14 @@ discoverer_discovered_cb (GstDiscoverer * discoverer,
|
||||||
if (tags)
|
if (tags)
|
||||||
gst_tag_list_foreach (tags, (GstTagForeachFunc) _set_meta_foreach, mfs);
|
gst_tag_list_foreach (tags, (GstTagForeachFunc) _set_meta_foreach, mfs);
|
||||||
|
|
||||||
if (err == NULL)
|
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) {
|
||||||
|
err = 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, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,8 +183,8 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline,
|
||||||
g_application_quit (G_APPLICATION (self));
|
g_application_quit (G_APPLICATION (self));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opts->needs_set_state
|
if (!self->priv->seenerrors && opts->needs_set_state &&
|
||||||
&& gst_element_set_state (GST_ELEMENT (self->priv->pipeline),
|
gst_element_set_state (GST_ELEMENT (self->priv->pipeline),
|
||||||
GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
|
GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
|
||||||
g_error ("Failed to start the pipeline\n");
|
g_error ("Failed to start the pipeline\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue