[uvch264src in 1.1.1.1] "Got data flow before segment event" warnings until crash
Peter Rennert
p.rennert at cs.ucl.ac.uk
Thu Jul 25 09:22:24 PDT 2013
A bit of an update today.
To figure out what is going on normally and what is different in the
diseased frame I printed out the debug line [line 508] that was already
in the code, augmented with the total size of the buffer. The original
line was:
GST_DEBUG_OBJECT (self,
"Found APP4 marker (%d). JPG: %d-%d - APP4: %d - %d",
segment_size,
last_offset, i, i, i + 2 + segment_size);
I print for each time in the loop (before the sanity test that will fail
finally):
printf("Found APP4 marker (%d). JPG: %d-%d - APP4: %d - %d - size:
%d\n", segment_size,
last_offset, i, i, i + 2 + segment_size, (int)size);
What I get for a normal frame is about this. The total buffer size
changes and also the size of the first APP4 chunk, however, I always
seem to get 4 blocks for each frame. The segment size of the first
marker differs between the individual frames, while the 2nd, 3rd and 4th
markers are the same size all the time as far as I can tell:
Found APP4 marker (13010). JPG: 0-8 - APP4: 8 - 13020 - size: 166660
Found APP4 marker (65533). JPG: 13020-13020 - APP4: 13020 - 78555 -
size: 166660
Found APP4 marker (65533). JPG: 78555-78555 - APP4: 78555 - 144090 -
size: 166660
Found APP4 marker (22566). JPG: 144090-144090 - APP4: 144090 - 166658 -
size: 166660
The frame that causes the failure of the system has the following output:
Found APP4 marker (12084). JPG: 0-8 - APP4: 8 - 12094 - size: 165485
Found APP4 marker (65533). JPG: 12094-12094 - APP4: 12094 - 77629 -
size: 165485
Found APP4 marker (65533). JPG: 77629-77629 - APP4: 77629 - 143164 -
size: 165485
Found APP4 marker (22566). JPG: 143164-143164 - APP4: 143164 - 165732 -
size: 165485
As you can see it seems as the last segment reaches out of the total
size of the buffer. As the last segment seems to be always of a length
22566, I think for some reason (that does not happen in gstreamer 0.10)
a piece of the h264 stream is missing in this particular buffer.
The number of bytes getting lost is not the same for different trials,
neither is the cut-off. For my second trial I got:
Found APP4 marker (22566). JPG: 144796-144796 - APP4: 144796 - 167364 -
size: 165815
So where are these bytes? And why are they missing so regularly?
More information about the gstreamer-devel
mailing list