[Bug 705991] Adding support for DASH common encryption to qtdemux and dashdemux
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Jul 20 04:52:25 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=705991
--- Comment #131 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 307012
--> https://bugzilla.gnome.org/attachment.cgi?id=307012
dashdemux: add support for generating Protection events from ContentProtection
elements
>+ if (cp->schemeIdUri && g_str_has_prefix (cp->schemeIdUri, "urn:uuid:")) {
>+ pssi_len = g_utf8_strlen (cp->value, -1);
>+ pssi = gst_buffer_new_wrapped (g_memdup (cp->value, pssi_len), pssi_len);
>+ GST_LOG_OBJECT (stream, "Queuing Protection event on source pad");
>+ event = gst_event_new_protection (cp->schemeIdUri + 9, pssi, "dash/mpd");
>+ gst_adaptive_demux_stream_add_event ((GstAdaptiveDemuxStream *) stream,
>+ event);
>+ gst_buffer_unref (pssi);
>+ }
Just to confirm, did you use g_utf8_strlen() here on purpose, or because you
thought it was the right thing to do with UTF-8 strings? I think it should be a
plain strlen(). g_utf8_strlen() returns the number of *characters* in a UTF-8
string, which may be smaller than the length of the string in bytes. strlen()
will return the length in bytes. I suspect the string will be ASCII here
anyway, so it won't matter.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list