diff --git a/spa/plugins/libcamera/libcamera-utils.cpp b/spa/plugins/libcamera/libcamera-utils.cpp index bf813af52..c5ff74226 100644 --- a/spa/plugins/libcamera/libcamera-utils.cpp +++ b/spa/plugins/libcamera/libcamera-utils.cpp @@ -885,9 +885,12 @@ void impl::requestComplete(libcamera::Request *request) } const FrameMetadata &fmd = buffer->metadata(); - - if (impl->clock) { + /* FIXME, we should follow the driver clock and target_ values. + * for now we ignore and use our own. */ + impl->clock->target_rate = port->rate; + impl->clock->target_duration = 1; + impl->clock->nsec = fmd.timestamp; impl->clock->rate = port->rate; impl->clock->position = fmd.sequence; diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c index fc2a9391d..b3670cfd5 100644 --- a/spa/plugins/v4l2/v4l2-utils.c +++ b/spa/plugins/v4l2/v4l2-utils.c @@ -1289,6 +1289,11 @@ static int mmap_read(struct impl *this) spa_log_trace(this->log, "v4l2 %p: have output %d", this, buf.index); if (this->clock) { + /* FIXME, we should follow the driver clock and target_ values. + * for now we ignore and use our own. */ + this->clock->target_rate = port->rate; + this->clock->target_duration = 1; + this->clock->nsec = pts; this->clock->rate = port->rate; this->clock->position = buf.sequence;