mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
urisourcebin: Error out if a source doesn't expose pads
Looks like this fell through the cracks. If a source element doesn't have dynamic pads and doesn't provide any source pad ... we should properly error out. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2784>
This commit is contained in:
parent
3305d7ce8d
commit
586ec1a672
1 changed files with 8 additions and 4 deletions
|
@ -2320,12 +2320,10 @@ setup_source (GstURISourceBin * urisrc)
|
|||
/* source provides raw data, we added the pads and we can now signal a
|
||||
* no_more pads because we are done. */
|
||||
gst_element_no_more_pads (GST_ELEMENT_CAST (urisrc));
|
||||
return TRUE;
|
||||
} else if (!have_out) {
|
||||
GST_DEBUG_OBJECT (urisrc, "Source has no output pads");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
if (!have_out)
|
||||
goto no_pads;
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (urisrc, "Source has dynamic output pads");
|
||||
/* connect a handler for the new-pad signal */
|
||||
|
@ -2392,6 +2390,12 @@ invalid_source:
|
|||
(_("Source element is invalid.")), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
no_pads:
|
||||
{
|
||||
GST_ELEMENT_ERROR (urisrc, CORE, FAILED,
|
||||
(_("Source element has no pads.")), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
streaming_failed:
|
||||
{
|
||||
/* message was posted */
|
||||
|
|
Loading…
Reference in a new issue