{
gboolean apcontinue = TRUE;
GValueArray *factories = NULL, *result = NULL;
- GstParsePad *parsepad;
+ GstParsePad *parsepad = NULL;
GstElementFactory *factory;
const gchar *classification;
gboolean is_parser_converter = FALSE;
goto expose_pad;
}
/* Else we will bail out */
- gst_object_unref (parsepad);
goto unknown_type;
}
if (is_parser_converter)
gst_object_unref (pad);
- gst_object_unref (parsepad);
g_value_array_free (factories);
- if (!res)
+ if (!res) {
+ if (deadend_details == NULL) {
+ /* connect_pad() only failed because no element was compatible
+ * (i.e. deadend_details is NULL). If this stream is an elementary stream,
+ * we can expose it since this is non-fatal */
+ GstPbUtilsCapsDescriptionFlags caps_flags =
+ gst_pb_utils_get_caps_description_flags (caps);
+ if (caps_flags
+ && !(caps_flags & GST_PBUTILS_CAPS_DESCRIPTION_FLAG_CONTAINER)) {
+ goto expose_pad;
+ }
+ }
goto unknown_type;
+ }
+ gst_object_unref (parsepad);
gst_caps_unref (caps);
return;
unknown_type:
{
GST_LOG_OBJECT (pad, "Unknown type, posting message and firing signal");
+ if (parsepad)
+ gst_object_unref (parsepad);
chain->deadend_details = deadend_details;
chain->deadend = TRUE;