From: Edward Hervey Date: Wed, 19 Oct 2022 09:00:09 +0000 (+0200) Subject: urisourcebin: Error out if a source doesn't expose pads X-Git-Tag: 1.22.0~392 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=586ec1a67277403e1ab4def413e4e58d67dc00e1;p=platform%2Fupstream%2Fgstreamer.git 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: --- diff --git a/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c b/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c index 9161a07..abbad53 100644 --- a/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c +++ b/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c @@ -2321,11 +2321,9 @@ setup_source (GstURISourceBin * urisrc) * 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 */