mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
aggregator: Fix handling NEED_DATA return from update_src_caps()
Since GST_AGGREGATOR_FLOW_NEED_DATA == GST_FLOW_CUSTOM_ERROR == -100, in order to print the right debug message, we have to check that condition first before comparing ret with GST_FLOW_OK. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7663>
This commit is contained in:
parent
f77628a598
commit
5d995382f8
1 changed files with 4 additions and 4 deletions
|
@ -1290,12 +1290,12 @@ gst_aggregator_default_negotiate (GstAggregator * self)
|
||||||
GST_DEBUG_OBJECT (self, "updating caps from %" GST_PTR_FORMAT,
|
GST_DEBUG_OBJECT (self, "updating caps from %" GST_PTR_FORMAT,
|
||||||
downstream_caps);
|
downstream_caps);
|
||||||
ret = agg_klass->update_src_caps (self, downstream_caps, &caps);
|
ret = agg_klass->update_src_caps (self, downstream_caps, &caps);
|
||||||
if (ret < GST_FLOW_OK) {
|
if (ret == GST_AGGREGATOR_FLOW_NEED_DATA) {
|
||||||
GST_WARNING_OBJECT (self, "Subclass failed to update provided caps");
|
|
||||||
goto done;
|
|
||||||
} else if (ret == GST_AGGREGATOR_FLOW_NEED_DATA) {
|
|
||||||
GST_DEBUG_OBJECT (self, "Subclass needs more data to decide on caps");
|
GST_DEBUG_OBJECT (self, "Subclass needs more data to decide on caps");
|
||||||
goto done;
|
goto done;
|
||||||
|
} else if (ret < GST_FLOW_OK) {
|
||||||
|
GST_WARNING_OBJECT (self, "Subclass failed to update provided caps");
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
if ((caps == NULL || gst_caps_is_empty (caps)) && ret >= GST_FLOW_OK) {
|
if ((caps == NULL || gst_caps_is_empty (caps)) && ret >= GST_FLOW_OK) {
|
||||||
ret = GST_FLOW_NOT_NEGOTIATED;
|
ret = GST_FLOW_NOT_NEGOTIATED;
|
||||||
|
|
Loading…
Reference in a new issue