mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
pad: make some errors critical
When we have no chain function or when we are operating the pad in the wrong mode, emit a critical instead of posting an error message. This is certainly a programming error and we cannot always post a message (like when the pad has no parent)
This commit is contained in:
parent
7fc783f723
commit
386562f7e4
1 changed files with 12 additions and 18 deletions
30
gst/gstpad.c
30
gst/gstpad.c
|
@ -3369,9 +3369,8 @@ flushing:
|
|||
}
|
||||
wrong_mode:
|
||||
{
|
||||
GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, (NULL),
|
||||
("chain on pad %s:%s but it was not in push mode",
|
||||
GST_DEBUG_PAD_NAME (pad)));
|
||||
g_critical ("chain on pad %s:%s but it was not in push mode",
|
||||
GST_DEBUG_PAD_NAME (pad));
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (data));
|
||||
|
@ -3397,9 +3396,8 @@ probe_stopped:
|
|||
no_function:
|
||||
{
|
||||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (data));
|
||||
GST_ELEMENT_ERROR (parent, CORE, PAD, (NULL),
|
||||
("chain on pad %s:%s but it has no chainfunction",
|
||||
GST_DEBUG_PAD_NAME (pad)));
|
||||
g_critical ("chain on pad %s:%s but it has no chainfunction",
|
||||
GST_DEBUG_PAD_NAME (pad));
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
return GST_FLOW_NOT_SUPPORTED;
|
||||
}
|
||||
|
@ -3572,9 +3570,8 @@ flushing:
|
|||
}
|
||||
wrong_mode:
|
||||
{
|
||||
GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, (NULL),
|
||||
("pushing on pad %s:%s but it was not activated in push mode",
|
||||
GST_DEBUG_PAD_NAME (pad)));
|
||||
g_critical ("pushing on pad %s:%s but it was not activated in push mode",
|
||||
GST_DEBUG_PAD_NAME (pad));
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (data));
|
||||
return GST_FLOW_ERROR;
|
||||
|
@ -3756,9 +3753,8 @@ flushing:
|
|||
}
|
||||
wrong_mode:
|
||||
{
|
||||
GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, (NULL),
|
||||
("getrange on pad %s:%s but it was not activated in pull mode",
|
||||
GST_DEBUG_PAD_NAME (pad)));
|
||||
g_critical ("getrange on pad %s:%s but it was not activated in pull mode",
|
||||
GST_DEBUG_PAD_NAME (pad));
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
return GST_FLOW_ERROR;
|
||||
|
@ -3779,9 +3775,8 @@ no_parent:
|
|||
}
|
||||
no_function:
|
||||
{
|
||||
GST_ELEMENT_ERROR (parent, CORE, PAD, (NULL),
|
||||
("getrange on pad %s:%s but it has no getrangefunction",
|
||||
GST_DEBUG_PAD_NAME (pad)));
|
||||
g_critical ("getrange on pad %s:%s but it has no getrangefunction",
|
||||
GST_DEBUG_PAD_NAME (pad));
|
||||
RELEASE_PARENT (parent);
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
return GST_FLOW_NOT_SUPPORTED;
|
||||
|
@ -3937,9 +3932,8 @@ flushing:
|
|||
}
|
||||
wrong_mode:
|
||||
{
|
||||
GST_ELEMENT_ERROR (GST_PAD_PARENT (pad), CORE, PAD, (NULL),
|
||||
("gpulltange on pad %s:%s but it was not activated in pull mode",
|
||||
GST_DEBUG_PAD_NAME (pad)));
|
||||
g_critical ("pullrange on pad %s:%s but it was not activated in pull mode",
|
||||
GST_DEBUG_PAD_NAME (pad));
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue