mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +00:00
urisourcebin: Fix usage of raw and non-raw source provider
The computation in analyze_source was wrong, and would state that the element has "all raw source pads" if it had at least one. Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1029 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3199>
This commit is contained in:
parent
4df3da3bab
commit
0c47735c4a
1 changed files with 8 additions and 0 deletions
|
@ -1720,6 +1720,8 @@ analyse_source (GstURISourceBin * urisrc, gboolean * is_raw,
|
|||
gboolean res = TRUE;
|
||||
GstPad *pad;
|
||||
GValue item = { 0, };
|
||||
guint nb_raw = 0;
|
||||
guint nb_pads = 0;
|
||||
GstCaps *rawcaps = DEFAULT_CAPS;
|
||||
|
||||
*have_out = FALSE;
|
||||
|
@ -1740,6 +1742,7 @@ analyse_source (GstURISourceBin * urisrc, gboolean * is_raw,
|
|||
*have_out = FALSE;
|
||||
*is_raw = FALSE;
|
||||
*is_dynamic = FALSE;
|
||||
nb_pads = nb_raw = 0;
|
||||
gst_iterator_resync (pads_iter);
|
||||
break;
|
||||
case GST_ITERATOR_OK:
|
||||
|
@ -1754,10 +1757,12 @@ analyse_source (GstURISourceBin * urisrc, gboolean * is_raw,
|
|||
break;
|
||||
}
|
||||
|
||||
nb_pads++;
|
||||
/* caps on source pad are all raw, we can add the pad */
|
||||
if (*is_raw) {
|
||||
GstPad *output_pad;
|
||||
|
||||
nb_raw++;
|
||||
GST_URI_SOURCE_BIN_LOCK (urisrc);
|
||||
if (use_queue) {
|
||||
OutputSlotInfo *slot = get_output_slot (urisrc, FALSE, FALSE, NULL);
|
||||
|
@ -1808,6 +1813,9 @@ analyse_source (GstURISourceBin * urisrc, gboolean * is_raw,
|
|||
walk = g_list_next (walk);
|
||||
}
|
||||
|
||||
if (nb_pads && nb_pads == nb_raw)
|
||||
*is_raw = TRUE;
|
||||
|
||||
return res;
|
||||
no_slot:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue