Correspondence between appsrc input and appsink output buffers

benjamin.hepp at posteo.de benjamin.hepp at posteo.de
Wed Nov 9 21:24:09 UTC 2016


On 09.11.2016 08:49, Sebastian Dröge wrote:

> That's generally not a good idea and should cause crashes or other
> problems over time. You always have to do the reference counting
> correct.

Of course, after decreasing the ref count to 1 and adding the GstMeta to 
the buffer one has to increase the ref count to the previous value.

> If a buffer is not writable, you need to copy it (the buffer, not the
> actual memory inside it). See gst_buffer_make_writable() for automating
> that task.

I don't see how that can work for the GstMeta transformation function:
***_meta_transform (GstBuffer * transbuf, GstMeta * meta,
     GstBuffer * buffer, GQuark type, gpointer data)

You can very well copy the transbuf buffer and add the GstMeta to the 
copy but then how could you replace transbuf with it?



More information about the gstreamer-devel mailing list