[Bug 762148] dashdemux: correctly handle an HTTP-XSDATE that is exactly the size of the date string
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Fri Feb 19 08:56:58 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=762148
--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 321396
--> https://bugzilla.gnome.org/attachment.cgi?id=321396
proposed patch
Thanks, looks good, just a few small comments:
>+ gpointer str;
gchar *str;
>+ str = g_malloc0 (gst_buffer_get_size (buffer) + 1);
>+ if (gst_buffer_map (buffer, &mapinfo, GST_MAP_READ)) {
>+ memcpy (str, mapinfo.data, gst_buffer_get_size (buffer));
Could just do
str = g_strndup (mapinfo.data, mapinfo.size);
here which will add a 0-terminator for you.
--
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