mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
qtdemux: create correct pad names in encrypted streams
Refer to "original-media-type" when setting stream's subtype for encrypted streams in mss mode. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/628>
This commit is contained in:
parent
18aeb5bac1
commit
f8e686078d
1 changed files with 10 additions and 0 deletions
|
@ -1925,6 +1925,16 @@ gst_qtdemux_setcaps (GstQTDemux * demux, GstCaps * caps)
|
|||
&CUR_STREAM (stream)->n_channels);
|
||||
gst_structure_get_int (structure, "rate", &rate);
|
||||
CUR_STREAM (stream)->rate = rate;
|
||||
} else if (gst_structure_has_name (structure, "application/x-cenc")) {
|
||||
if (gst_structure_has_field (structure, "original-media-type")) {
|
||||
const gchar *media_type =
|
||||
gst_structure_get_string (structure, "original-media-type");
|
||||
if (g_str_has_prefix (media_type, "video")) {
|
||||
stream->subtype = FOURCC_vide;
|
||||
} else if (g_str_has_prefix (media_type, "audio")) {
|
||||
stream->subtype = FOURCC_soun;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
gst_caps_replace (&demux->media_caps, (GstCaps *) mediacaps);
|
||||
|
|
Loading…
Reference in a new issue