Skip to content

Commit

Permalink
[media] solo6x10: use v4l2_get_timestamp to fill in buffer timestamp
Browse files Browse the repository at this point in the history
The timestamp of a v4l2_buffer was advertised as being CLOCK_MONOTONIC,
but instead a timestamp from a header field was used. This is inconsistent
and not what applications expect. Use v4l2_get_timestamp to properly
set the timestamp.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Dec 18, 2015
1 parent 02a34b6 commit 9057bc2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,7 @@ static int solo_enc_fillbuf(struct solo_enc_dev *solo_enc,

if (!ret) {
vbuf->sequence = solo_enc->sequence++;
vbuf->timestamp.tv_sec = vop_sec(vh);
vbuf->timestamp.tv_usec = vop_usec(vh);
v4l2_get_timestamp(&vbuf->timestamp);

/* Check for motion flags */
if (solo_is_motion_on(solo_enc) && enc_buf->motion) {
Expand Down

0 comments on commit 9057bc2

Please sign in to comment.