mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
parsebin: Fix stream type for encrypted streams
Without this patch the stream type for encrypted streams would be 'unknown'. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6138>
This commit is contained in:
parent
4e782da32e
commit
2834973d55
1 changed files with 5 additions and 0 deletions
|
@ -3978,6 +3978,11 @@ guess_stream_type_from_caps (GstCaps * caps)
|
|||
s = gst_caps_get_structure (caps, 0);
|
||||
name = gst_structure_get_name (s);
|
||||
|
||||
if (gst_structure_has_field (s, "original-media-type")) {
|
||||
/* Caps describe an encrypted payload, use original-media-type to determine stream type. */
|
||||
name = gst_structure_get_string (s, "original-media-type");
|
||||
}
|
||||
|
||||
if (g_str_has_prefix (name, "video/") || g_str_has_prefix (name, "image/"))
|
||||
return GST_STREAM_TYPE_VIDEO;
|
||||
if (g_str_has_prefix (name, "audio/"))
|
||||
|
|
Loading…
Reference in a new issue