[gst-devel] Failed to free the memory allocated by gst_pad_alloc_buffer_and_set_caps()
Hu, Gang A
gang.a.hu at intel.com
Wed Aug 4 14:33:02 CEST 2010
Hi,
I had a v4l2 camera driver with the "V4L2_MEMORY_USERPTR" type memory support and a camera source element "v4l2newcamsrc" to support this type memory.
When I running the pipeline bellow
"gst-launch v4l2newcamsrc num-buffers=1 ! ffmpegcolorspace ! video/x-raw-yuv,width=640,height=480 ! filesink location=image_640.yuv"
The image can be captured successfully.
But when the buffers are freed in the camera source element, there will always be an error message in the terminal.
*** glibc detected *** /usr/local/meego/bin/gst-launch-0.10: free(): invalid pointer: 0xb73c8008 ***
======= Backtrace: =========
/lib/libc.so.6[0x550cc1]
/usr/local/meego/lib/libgstreamer-0.10.so.0(+0x29c06)[0xb7792c06]
/usr/local/meego/lib/libgstreamer-0.10.so.0(gst_mini_object_unref+0xaf)[0xb77b94df]
.
I use gst_pad_alloc_buffer_and_set_caps() to allocate the buffer from the download element in the camera source element.
When the application exit, gst_buffer_unref (buffer) will be called to free the memory. This code case the error above after debugging with GDB.
I have two questions about that.
1. Which element is responsible for the memory allocation when call "gst_pad_alloc_buffer_and_set_caps()" in camera source element in my pipeline.
2. How to free the memory allocated by "gst_pad_alloc_buffer_and_set_caps()"? Why the error "free(): invalid pointer: 0xb73c8008 ***" occurred.
Thanks.
Best Regards!
Hu Gang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100804/c650b075/attachment.htm>
More information about the gstreamer-devel
mailing list