v4l2: use the buffer time as pts

Don't try to use the seq number as pts, just use the timestamp
returned from v4l2 if any so it can be matched against the clock.
This commit is contained in:
Wim Taymans 2020-02-11 11:21:34 +01:00
parent 09503f0987
commit 6085c0eaee

View file

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