summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorHosang Lee <hosang10.lee@lge.com>2020-06-16 17:23:44 +0900
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-07-28 11:41:51 +0000
commitf8e686078dc6bfaf48c269e0dda11894653dc6a7 (patch)
tree608574d6fb6f582b4936aecad4418abd1cc08a26 /gst
parent18aeb5bac1862e9f3da45ca2587ad2fe2b9c5fe4 (diff)
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>
Diffstat (limited to 'gst')
-rw-r--r--gst/isomp4/qtdemux.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 93ebef213..5b79ace9b 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -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);