[Bug 705991] Adding support for DASH common encryption to qtdemux and dashdemux
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Jul 20 06:18:57 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=705991
--- Comment #132 from A Ashley <bugzilla at ashley-family.net> ---
(In reply to Tim-Philipp Müller from comment #131)
> Comment on attachment 307012 [details] [review]
> 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.
I used g_utf8_strlen because the MPD files are UTF-8 encoded, but you are
right, what I actually want is the number of bytes, not the number of
characters.
I have also found another problem, which is that the code assumes that
"urn:uuid:" is always lower case, which is not a valid assumption.
--
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