mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
decodebin2: Handle raw streams we don't want.
If a file contains raw streams (not requiring a decoder) that we do not want (expose-all-streams == FALSE), we would previously consider those of unknown-type (missing a decoder) ... whereas in fact it was just because they don't need decoders. This only applies if expose-all-streams is FALSE.
This commit is contained in:
parent
a5c35621c3
commit
cbff745b49
1 changed files with 13 additions and 2 deletions
|
@ -1363,9 +1363,20 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
|
||||||
if (factories == NULL)
|
if (factories == NULL)
|
||||||
goto expose_pad;
|
goto expose_pad;
|
||||||
|
|
||||||
/* if the array is empty, we have an unknown type */
|
/* if the array is empty, we have a type for which we have no decoder */
|
||||||
if (factories->n_values == 0) {
|
if (factories->n_values == 0) {
|
||||||
/* no compatible factories */
|
if (!dbin->expose_allstreams) {
|
||||||
|
GstCaps *raw = gst_static_caps_get (&default_raw_caps);
|
||||||
|
|
||||||
|
/* If the caps are raw, this just means we don't want to expose them */
|
||||||
|
if (gst_caps_can_intersect (raw, caps)) {
|
||||||
|
gst_caps_unref (raw);
|
||||||
|
goto discarded_type;
|
||||||
|
}
|
||||||
|
gst_caps_unref (raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if not we have a unhandled type with no compatible factories */
|
||||||
g_value_array_free (factories);
|
g_value_array_free (factories);
|
||||||
gst_object_unref (dpad);
|
gst_object_unref (dpad);
|
||||||
goto unknown_type;
|
goto unknown_type;
|
||||||
|
|
Loading…
Reference in a new issue