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

Peter Rennert p.rennert at cs.ucl.ac.uk
Fri Aug 9 04:45:11 PDT 2013


Hi Rob,

Is there a way for you to print both buffers (uvch264src and UVC Driver) 
out and compare them?

Maybe the v4l2src inserts some kind of metadata in the buffer at some 
time stamps. Or maybe just modifies somehow the two bytes after the 
first 0xff 0xe4.

If that is the case then this line (gst_uvc_h264_mjpg_demux_chain: 498):

       segment_size = GUINT16_FROM_BE (*((guint16 *) (info.data + i + 2)));


will set the segment_size wrong.

However, I compared your first segment size with the one I've got 
earlier (email from the 25/07). They are different. So whatever those 
bytes are they are not static. It just pops into my mind that perhaps 
the v4l2 swallows first bytes of the stream. In this case the 0xff 0xe4 
that the uvch264src detects are actually image data rather than part of 
the metadata.

What puzzles me as well is that the first segment size is parsed wrong 
and still it fails at the last segment. Which is weird. I would expect 
that if it gets a too large first segment it will parse/copy too much of 
the buffer as the first segment. The result should be that it would not 
be able to find (i.e. skip) the second APP4 marker, including its 
segment size tag and continue with the third one. This is because i in 
the loop is incremented with the segment_size to avoid looping through 
the entire buffer in order to find the APP4 markers (line 648).

Peter


More information about the gstreamer-devel mailing list