decodebin2: Recheck shutdown behaviour in error case

If we can expose the main chain, recheck whether we are shutting
down or not.

decodebin2 might have been set to READY/NULL during the attempt
to expose, which would cause it to fail ... but it is not a fatal
issue.
This commit is contained in:
Edward Hervey 2017-11-02 07:55:16 +01:00 committed by Edward Hervey
parent 39ba6427f1
commit f448cecceb

View file

@ -4588,6 +4588,14 @@ retry:
g_list_foreach (endpads, (GFunc) gst_object_unref, NULL); g_list_foreach (endpads, (GFunc) gst_object_unref, NULL);
g_list_free (endpads); g_list_free (endpads);
g_string_free (missing_plugin_details, TRUE); g_string_free (missing_plugin_details, TRUE);
/* Failures could be due to the fact that we are currently shutting down (recheck) */
DYN_LOCK (dbin);
if (G_UNLIKELY (dbin->shutdown)) {
GST_WARNING_OBJECT (dbin, "Currently, shutting down, aborting exposing");
DYN_UNLOCK (dbin);
return FALSE;
}
DYN_UNLOCK (dbin);
GST_ERROR_OBJECT (dbin, "Broken chain/group tree"); GST_ERROR_OBJECT (dbin, "Broken chain/group tree");
g_return_val_if_reached (FALSE); g_return_val_if_reached (FALSE);
return FALSE; return FALSE;