Commit 321d2c2e authored by Thibault Saunier's avatar Thibault Saunier 🌵
Browse files

ges: Raise an error when the discoverer returns != RESULT_OK

And do not try to run the pipeline when that happens
parent 4f83cde1
......@@ -354,8 +354,14 @@ discoverer_discovered_cb (GstDiscoverer * discoverer,
if (tags)
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);
} 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);
}
......
......@@ -183,8 +183,8 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline,
g_application_quit (G_APPLICATION (self));
}
if (opts->needs_set_state
&& gst_element_set_state (GST_ELEMENT (self->priv->pipeline),
if (!self->priv->seenerrors && opts->needs_set_state &&
gst_element_set_state (GST_ELEMENT (self->priv->pipeline),
GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
g_error ("Failed to start the pipeline\n");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment