Question about gst_structure_get_name()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about gst_structure_get_name()

W. Michael Petullo
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.

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

av-meta-reader-gst.c (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Question about gst_structure_get_name()

Vineeth-2


On Tue, May 18, 2010 at 10:13 PM, W. Michael Petullo <[hidden email]> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel