[gst-devel] Buffer size mismatch in custom plugin
t.i.m at zen.co.uk
Fri Apr 11 10:47:38 CEST 2008
On Fri, 2008-04-11 at 11:02 +0400, AlannY wrote:
> I'm writing a custom video filter (as a custom plugin) (still newbie).
> So, in the _chain() function I checked buffer (GstBuffer) size:
> static GstFlowReturn
> gst_myfilter_chain (GstPad *pad,
> GstBuffer *buf)
> g_print("%d\n", buf->size);
> g_print("%d\n", width*height*3);
> return gst_pad_push (filter->srcpad, buf);
> I got the following messages:
> As you can see buf->size is smaller then frame size ( width*height*3 ).
> Why? How can I write something in buffer if it's smaller then I
> expected. I got Segmentation fault when trying to do it.
Well, what are the caps/formats involved here? RGB/YUV? Which? What are
the template caps of your plugin?
More information about the gstreamer-devel