GstBuffers from appsrc need-data callback are not getting freed

Nikos Chantziaras realnc at gmail.com
Mon Feb 23 16:00:28 PST 2015


On 24/02/15 01:24, Nikos Chantziaras wrote:
> I have a severe memory leak when using gstreamer 1.4.5. [...]
>[...]
>        // *** This allocation leaks ***
>        buffer = gst_buffer_new_allocate(NULL, length, NULL);
>        GstMapInfo mapInf;
>        if (not gst_buffer_map(buffer, &mapInf, GST_MAP_WRITE)) {

OK, never mind. Stupidity struck. If you gst_buffer_map() something, you 
need to gst_buffer_unmap() it after you're done accessing the mapped 
memory. I didn't do that, and that caused the leak.

Sorry for the noise.


More information about the gstreamer-devel mailing list