Commit 2018f072 authored by Dave Stevenson's avatar Dave Stevenson Committed by popcornmix
Browse files

staging: bcm2835-camera: Ensure timestamps never go backwards.



There is an awkward situation with H264 header bytes. Currently
they are returned with a PTS of 0 because they aren't associated
with a timestamped frame to encode. These are handled by either
returning the timestamp of the last buffer to have been received,
or in the case of the first buffer the timestamp taken at
start_streaming.
This results in a race where the current frame may have started
before we take the start time, which results in the first encoded
frame having an earlier timestamp than the header bytes.

Ensure that we never return a negative delta to the user by checking
against the previous timestamp.

Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
parent b786a187
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment