[gst-devel] Wrote my first plugin but I keep getting 'gst_segment_clip' error

danielkun at iremo.com danielkun at iremo.com
Fri Feb 29 07:41:32 CET 2008


Hello,

I wrote a Gstreamer plugin that converts network byte order to little
endian to be able to play LPCM files.

The plugin works fine except for the error message below that appears
once after execution.
Does anyone know what is causing this?

(test_plugin:7275): GStreamer-CRITICAL **: gst_segment_clip: assertion
'segment->format == format' failed

I pasted the code at the end.

Thank you,
Daniel

--

static GstFlowReturn
gst_endianconvert_chain (GstPad * pad, GstBuffer * buf)
{
  guint32	size;
  guint8	*data;
  Gstendianconvert *filter;

  size = GST_BUFFER_SIZE (buf);
  data = GST_BUFFER_DATA (buf);

  unsigned char c2;
  int i;

  for (i = 0; i < size; i += 2) {
    c2 = data[i + 1];
    data[i + 1] = data[i];
    data[i] = c2;
  }

  filter = GST_ENDIANCONVERT (GST_OBJECT_PARENT (pad));

  return gst_pad_push (filter->srcpad, buf);
}





More information about the gstreamer-devel mailing list