From b35979c31aa1f812a1d3cfdeb5b4e7188f97bb7e Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Mon, 14 Nov 2016 11:06:00 +0100 Subject: [PATCH] mssdemux: 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 --- ext/smoothstreaming/gstmssdemux.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c index b66e195143..12fb40497e 100644 --- a/ext/smoothstreaming/gstmssdemux.c +++ b/ext/smoothstreaming/gstmssdemux.c @@ -476,16 +476,14 @@ gst_mss_demux_setup_streams (GstAdaptiveDemux * demux) } if (protected) { - gsize protection_data_len; - guchar *decoded_data = - g_base64_decode (protection_data, &protection_data_len); GstBuffer *protection_buffer = - gst_buffer_new_wrapped (decoded_data, protection_data_len); + gst_buffer_new_wrapped ((gpointer) protection_data, + strlen (protection_data)); GstEvent *event = gst_event_new_protection (protection_system_id, protection_buffer, "smooth-streaming"); - GST_LOG_OBJECT (stream, "Queuing Protection event on source pad"); + GST_LOG_OBJECT (stream, "Queueing Protection event on source pad"); gst_adaptive_demux_stream_queue_event ((GstAdaptiveDemuxStream *) stream, event); gst_buffer_unref (protection_buffer);