diff options
author | Philippe Normand <philn@igalia.com> | 2016-11-14 11:08:24 +0100 |
---|---|---|
committer | Philippe Normand <philn@igalia.com> | 2016-11-14 11:50:13 +0100 |
commit | 0fbd2edaffe97e920aa0fa8a509256a1a70a3bfe (patch) | |
tree | e1cf953357c7fc916004305335d2df490debd72b | |
parent | b35979c31aa1f812a1d3cfdeb5b4e7188f97bb7e (diff) |
mpdparser: wrap unmodified data in protection event
PlayReady being the one of the few DRM formats encoding its data with
base64 it was not consistent to have a special case for this. So the
base64 decoding operation now needs to be done by the protection event
consumer, if needed.
https://bugzilla.gnome.org/show_bug.cgi?id=774112
-rw-r--r-- | ext/dash/gstmpdparser.c | 3 | ||||
-rw-r--r-- | tests/check/elements/dash_demux.c | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index f3a4b849a..1e757bd59 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -1743,7 +1743,6 @@ gst_mpdparser_parse_content_protection_node (GList ** list, xmlNode * a_node) for (cur_node = a_node->children; cur_node; cur_node = cur_node->next) { if (cur_node->type == XML_ELEMENT_NODE) { if (xmlStrcmp (cur_node->name, (xmlChar *) "pro") == 0) { - gsize decoded_len; GstDescriptorType *new_descriptor; new_descriptor = g_slice_new0 (GstDescriptorType); *list = g_list_append (*list, new_descriptor); @@ -1753,8 +1752,6 @@ gst_mpdparser_parse_content_protection_node (GList ** list, xmlNode * a_node) gst_mpdparser_get_xml_node_content (cur_node, &new_descriptor->value); - g_base64_decode_inplace (new_descriptor->value, &decoded_len); - *(new_descriptor->value + decoded_len) = '\0'; goto beach; } } diff --git a/tests/check/elements/dash_demux.c b/tests/check/elements/dash_demux.c index ae89ced09..7cb1b93f3 100644 --- a/tests/check/elements/dash_demux.c +++ b/tests/check/elements/dash_demux.c @@ -1382,7 +1382,7 @@ testContentProtectionDashdemuxSendsEvent (GstAdaptiveDemuxTestEngine * engine, fail_if (str == NULL); } else if (g_strcmp0 (system_id, "9a04f079-9840-4286-ab92-e65be0885f95") == 0) { fail_unless (g_strcmp0 (origin, "dash/mpd") == 0); - fail_unless (g_strcmp0 (value, "test") == 0); + fail_unless (g_strcmp0 (value, "dGVzdA==") == 0); } else { fail ("unexpected content protection event '%s'", system_id); } |