ges:source: Handle missing elements in converters

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/204>
This commit is contained in:
Thibault Saunier 2020-07-31 22:02:01 -04:00
parent 6acee38459
commit 10f1b3555b

View file

@ -153,7 +153,12 @@ ges_source_create_topbin (GESSource * source, const gchar * bin_name,
priv->topbin = gst_object_ref (bin);
last = link_elements (bin, elements);
if (last) {
priv->first_converter = gst_object_ref (elements->pdata[0]);
gint i = 0;
while (!elements->pdata[i])
i++;
priv->first_converter = gst_object_ref (elements->pdata[i]);
priv->last_converter = gst_object_ref (last);
}