in this method you get the sample,buffer and map data. I have a memory leak i
believe. I feel like it might be the buffer in this method. If I go to use
gst_buffer_unref or gst_object_unref it will say "failed to refcount to 0"
or "GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT
(object)' failed". I just wondered if maybe it's fine the way it is, or I
should change the way I unref sample,mapdata,buffer.
if you reference an object in the main object in different methods create a
memory leak? This isn't how I do the pipeline but just an example. Just
wondering if going too fast before it has a chance to unreference an object?
GstElement* source,* parse;
Le jeudi 07 décembre 2017 à 16:34 -0700, killerrats a écrit :
> when I added the gst_buffer_unref it keeps it down a little but
> sample unref
> will fail. saying:
> GStreamer-CRITICAL **: gst_mini_object_unref: assertion
> 'mini_object->refcount > 0' failed
No, the buffer is unrefed when you unref the sample. What you forgot is
to unmap the buffer, see gst_buffer_unmap(). Not unmapping a buffer (or
a memory) will leak that object.