Skip to content

Commit

Permalink
gst-dsp-buffer: fix memory leak
Browse files Browse the repository at this point in the history
In case of a non pinned (i.e. non recyclable) buffer the gstdspbuffer
should deallocate the memory it holds.

Signed-off-by: Miguel Verdu <luiverco@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@nokia.com>
  • Loading branch information
miverco authored and Felipe Contreras committed Apr 27, 2011
1 parent f37469c commit ef195de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gstdspbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ GstBuffer *gst_dsp_buffer_new(GstDspBase *base, struct td_buffer *tb)
dmm_buffer_t *b = tb->data;
buf = (GstBuffer *) gst_mini_object_new(type);
gst_buffer_set_caps(buf, GST_PAD_CAPS(base->srcpad));
if (!tb->pinned)
GST_BUFFER_MALLOCDATA(buf) = b->allocated_data;
GST_BUFFER_DATA(buf) = b->data;
GST_BUFFER_SIZE(buf) = b->len;
dsp_buf = (GstDspBuffer *) buf;
Expand Down

0 comments on commit ef195de

Please sign in to comment.