decodebin: Check if the element really accepts the caps after setting it to READY
It might know the caps constraints for sure only after opening a decoder.
This commit is contained in:
parent
8827437b61
commit
2faef82b9a
@ -2009,6 +2009,16 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad,
|
|||||||
/* Stop filtering errors. */
|
/* Stop filtering errors. */
|
||||||
remove_error_filter (dbin, element);
|
remove_error_filter (dbin, element);
|
||||||
|
|
||||||
|
/* check if we still accept the caps on the pad after setting
|
||||||
|
* the element to READY */
|
||||||
|
if (!gst_pad_query_accept_caps (sinkpad, caps)) {
|
||||||
|
GST_WARNING_OBJECT (dbin, "Element %s does not accept caps",
|
||||||
|
GST_ELEMENT_NAME (element));
|
||||||
|
gst_object_unref (sinkpad);
|
||||||
|
gst_bin_remove (GST_BIN (dbin), element);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
gst_object_unref (sinkpad);
|
gst_object_unref (sinkpad);
|
||||||
GST_LOG_OBJECT (dbin, "linked on pad %s:%s", GST_DEBUG_PAD_NAME (pad));
|
GST_LOG_OBJECT (dbin, "linked on pad %s:%s", GST_DEBUG_PAD_NAME (pad));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user