[uvch264src in] "Got data flow before segment event" warnings until crash

Peter Rennert p.rennert at cs.ucl.ac.uk
Fri Jul 12 11:42:30 PDT 2013

I tried to find the origin of that error message and I think I found it 
in the gstuvc264_mjpgdemux.c. What I get from the code is that the error 
gets thrown if buffer does not comply to the usual H264 headering. The 
error gets thrown if the first "0xff 0xe4" byte chain in the buffer is 
reaching outside of the buffer. Therefore accessing them would lead to a 
segmentation fault.

The question is why does it happen at exactly 35sec all the time? Is it 
a hardware problem (does anyone have a C910 to test?) or is there 
something going wrong in gstreamer?

Below the piece of code that throws the error. It is identical  in 
gstreamer1 and gstreamer0.10. So it might well be that the error stems 
from another module of the framework.

line 480

last_offset = 0;
   data = GST_BUFFER_DATA (buf);
   size = GST_BUFFER_SIZE (buf);
   if (data == NULL || size == 0) {
     ret = gst_pad_push (self->priv->jpeg_pad, buf);
     goto done;

for (i = 0; i < size - 1; i++) {
     /* Check for APP4 (0xe4) marker in the jpeg */
     if (data[i] == 0xff && data[i + 1] == 0xe4) {
       guint16 segment_size;

       /* Sanity check sizes and get segment size */
       if (i + 4 >= size) {
             ("Not enough data to read marker size"), (NULL));
         ret = GST_FLOW_ERROR;
         goto done;
       segment_size = GUINT16_FROM_BE (*((guint16 *) (data + i + 2)));

On 07/11/2013 06:28 PM, yusuf.husainy wrote:
> Hello All,
> Yes, this is a bug definitely. While me and Rob were doing experiments, we
> noticed exactly same errors at exactly the same time in the pipeline - 34.66
> sec, around 35 sec.
> I recall initially, the pipeline used to abruptly end and then, as per Rob's
> recommendation, the pipeline did not end, but a lot of artefacts appeared in
> the video.
> This error always shows at 35 sec after the pipeline has started. A "35 sec
> bug" .
> Regards,
> Yusuf Husainy
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/uvch264src-in-1-1-1-1-Got-data-flow-before-segment-event-warnings-until-crash-tp4660982p4660991.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

More information about the gstreamer-devel mailing list