[Bug 697071] kate: port Kate subtitle plugin to 1.0
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Mon Apr 15 15:15:35 PDT 2013
https://bugzilla.gnome.org/show_bug.cgi?id=697071
GStreamer | gst-plugins-bad | git
--- Comment #10 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2013-04-15 22:15:31 UTC ---
> I've been looking at the unit tests, and I'm wondering if there's a better way
> of creating buffers than this:
>
> inbuffer = gst_buffer_new_allocate (NULL, sizeof(kate_header_0x80), NULL);
> fail_if (inbuffer == NULL);
> fail_if (gst_buffer_map(inbuffer, &info, GST_MAP_WRITE) != TRUE);
> memcpy (info.data, kate_header_0x80, sizeof (kate_header_0x80));
> gst_buffer_unmap (inbuffer, &info);
>
> I'd like to use gst_buffer_new_wrapped, but that takes ownership of the memory,
> which I assume wouldn't work with static variables.
You can use gst_buffer_fill(),or just pass g_memdup (data, size), size, it's
not like efficiency matters here. But you can also use new_wrapped_full and
pass something as free function that does nothing to make sure it doesn't get
freed.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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