decodebin3: Don't error out for unknown streams in default selection

If there is only unknown stream-type streams in the current collection
don't post an error straight away. This fixes a problem with RTSP
cameras and legacy upstream collection building, if the first
stream that rtspsrc outputs is the ONVIF metadata track. That
happens often on bandwidth-constrained camera inputs, as the
video and audio will naturally take longer to arrive.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9433>
This commit is contained in:
Jan Schmidt 2025-07-31 20:54:20 +10:00 committed by GStreamer Marge Bot
parent 55f72b1840
commit e653acc200

View File

@ -3171,9 +3171,14 @@ mq_slot_check_reconfiguration (MultiQueueSlot * slot)
/* Slot is not used. */
no_more_streams = no_more_streams_locked (dbin);
SELECTION_UNLOCK (dbin);
if (no_more_streams)
if (no_more_streams && slot->type != GST_STREAM_TYPE_UNKNOWN) {
/* Only error for known stream types, as there are cases where
* an upstream legacy collection might not yet be complete and
* rtsp for example might deliver a single ONVIF metadata stream
* to begin */
GST_ELEMENT_ERROR (slot->dbin, STREAM, FAILED, (NULL),
("No streams to output"));
}
return;
}