Linked list test src

Mohammed Sameer msameer at foolab.org
Mon Jul 2 07:23:19 PDT 2012


On Mon, Jul 02, 2012 at 07:04:15AM -0700, iron_guitarist1987 wrote:
> I'm trying to create a source element that outputs a linked list. I am
> getting the following error:
> 
> gst-launch vpeftestsrc ! filesink location=test.log
> ..
> Pipeline is PREROLLING ...
> 
> (gst-launch-0.10:16208): GStreamer-CRITICAL **: gst_buffer_create_sub:
> assertion `buffer->mini_object.refcount > 0' failed
> Caught SIGSEGV accessing address (nil)

[...]
> static GstFlowReturn
> gst_cgm_test_src_create (GstBaseSrc * basesrc, guint64 offset,
>     guint length, GstBuffer ** buffer)
> {
>   GstFlowReturn res;
>   GstCgmtestsrc *src;
>   src = GST_CGM_TEST_SRC (basesrc);
>   GstBuffer *buf;
>   CgmSet cgm;

What is CgmSet ?

>   buf = gst_buffer_new_allocate(NULL, sizeof(cgm), NULL);
>   buf = &cgm;

Here you are overwriting the value returned by gst_buffer_new_allocate()
with CgmSet which is local to the function and will be destroyed when the function returns.


>   
>   *buffer = buf;
> 
>   return GST_FLOW_OK;
> }

Cheers,

-- 
GPG-Key: 0xA3FD0DF7 - 9F73 032E EAC9 F7AD 951F  280E CB66 8E29 A3FD 0DF7
Debian User and Developer.
Homepage: www.foolab.org


More information about the gstreamer-devel mailing list