mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
rtspclientsink: fix retrieval of custom payloader caps
If a bin is passed as the custom payloader, the caps of its factory will be empty, the correct way to obtain the caps is to query its sinkpad.
This commit is contained in:
parent
7f6367cc63
commit
ba9395c158
1 changed files with 10 additions and 3 deletions
|
@ -1296,10 +1296,17 @@ gst_rtsp_client_sink_sinkpad_query (GstPad * pad, GstObject * parent,
|
|||
GstCaps *caps;
|
||||
|
||||
if (cspad->custom_payloader) {
|
||||
GstElementFactory *factory =
|
||||
gst_element_get_factory (cspad->custom_payloader);
|
||||
GstPad *sinkpad =
|
||||
gst_element_get_static_pad (cspad->custom_payloader, "sink");
|
||||
|
||||
caps = gst_rtsp_client_sink_get_payloader_caps (factory);
|
||||
if (sinkpad) {
|
||||
caps = gst_pad_query_caps (sinkpad, NULL);
|
||||
gst_object_unref (sinkpad);
|
||||
} else {
|
||||
GST_ELEMENT_ERROR (parent, CORE, NEGOTIATION, (NULL),
|
||||
("Custom payloaders are expected to expose a sink pad named 'sink'"));
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
/* No target yet - return the union of all payloader caps */
|
||||
caps = gst_rtsp_client_sink_get_all_payloaders_caps ();
|
||||
|
|
Loading…
Reference in a new issue