[gst-devel] Question about gst_structure_get_name()

vineeth nvineeth at gmail.com
Thu May 20 10:03:19 CEST 2010


On Tue, May 18, 2010 at 10:13 PM, W. Michael Petullo <mike at flyn.org> wrote:

> I am using gst_structure_get_name() to determine the mimetype of a
> stream (along with other things). In fact, I am doing this a few thousand
> times, each time setting up and tearing down a pipeline that makes use of
> decodebin. Because gst_structure_get_name() returns a constant string,
> I thought that it was wrong to free the returned string. However, I am
> finding that not free'ing the returned string results in what appears
> to be a memory leak. Approximately 5-6MB of memory is consumed
> after processing 2,419 media files. Free'ing the string returned by
> gst_structure_get_name() results in this memory not being consumed.
>

Try,
 valgrind --tool=memcheck --leak-check=full <program>

This should give a detailed memory profile.


>
> Can someone comment on the correct use of gst_structure_get_name()? Or
> do these symptoms indicate a problem elsewhere? I have attached my C
> source for reference.
>
> --
> Mike
>
> :wq
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100520/27fe826b/attachment.htm>


More information about the gstreamer-devel mailing list