mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
pad-monitor: Only add pending caps fields for source pads
As caps events are downstream, caps set travels from sinks to sources. Adding pending setcaps values to sink pads makes no sense as when a new caps is set on the sink it would compare with values currently set on the source pad, causing a critical failure when renegotiation happens.
This commit is contained in:
parent
1e39db18ad
commit
af2707d3a3
1 changed files with 8 additions and 1 deletions
|
@ -2302,8 +2302,12 @@ gst_validate_pad_monitor_setcaps_pre (GstValidatePadMonitor * pad_monitor,
|
|||
}
|
||||
}
|
||||
|
||||
if (gst_validate_pad_monitor_pad_should_proxy_othercaps (pad_monitor)) {
|
||||
if (GST_PAD_IS_SINK (GST_VALIDATE_PAD_MONITOR_GET_PAD (pad_monitor)) &&
|
||||
gst_validate_pad_monitor_pad_should_proxy_othercaps (pad_monitor)) {
|
||||
if (_structure_is_video (structure)) {
|
||||
GST_DEBUG_OBJECT (GST_VALIDATE_PAD_MONITOR_GET_PAD (pad_monitor),
|
||||
"Adding video common pending fields to other pad: %" GST_PTR_FORMAT,
|
||||
structure);
|
||||
gst_validate_pad_monitor_otherpad_add_pending_field (pad_monitor,
|
||||
structure, "width");
|
||||
gst_validate_pad_monitor_otherpad_add_pending_field (pad_monitor,
|
||||
|
@ -2313,6 +2317,9 @@ gst_validate_pad_monitor_setcaps_pre (GstValidatePadMonitor * pad_monitor,
|
|||
gst_validate_pad_monitor_otherpad_add_pending_field (pad_monitor,
|
||||
structure, "pixel-aspect-ratio");
|
||||
} else if (_structure_is_audio (structure)) {
|
||||
GST_DEBUG_OBJECT (GST_VALIDATE_PAD_MONITOR_GET_PAD (pad_monitor),
|
||||
"Adding audio common pending fields to other pad: %" GST_PTR_FORMAT,
|
||||
structure);
|
||||
gst_validate_pad_monitor_otherpad_add_pending_field (pad_monitor,
|
||||
structure, "rate");
|
||||
gst_validate_pad_monitor_otherpad_add_pending_field (pad_monitor,
|
||||
|
|
Loading…
Reference in a new issue