v4l2: set pts correctly

The pts is supposed to be go in sync with the clock. Our clock is based
on sequence numbers so translate the PTS to this as well.
This commit is contained in:
Wim Taymans 2018-08-15 21:33:58 +02:00
parent 26fa9eae39
commit b31832dac9

View file

@ -1170,7 +1170,7 @@ static int mmap_read(struct impl *this)
if (buf.flags & V4L2_BUF_FLAG_ERROR)
b->h->flags |= SPA_META_HEADER_FLAG_CORRUPTED;
b->h->seq = buf.sequence;
b->h->pts = pts;
b->h->pts = buf.sequence * 1000000000LL / port->rate.denom;
}
d = b->outbuf->datas;