@@ -286,7 +286,6 @@ private:
EventNotifier *fdBufferNotifier_;
State state_;
- std::optional<unsigned int> firstFrame_;
Timer watchdog_;
utils::Duration watchdogDuration_;
@@ -1904,19 +1904,6 @@ FrameBuffer *V4L2VideoDevice::dequeueBuffer()
if (V4L2_TYPE_IS_OUTPUT(buf.type))
return buffer;
- /*
- * Detect kernel drivers which do not reset the sequence number to zero
- * on stream start.
- */
- if (!firstFrame_.has_value()) {
- if (buf.sequence)
- LOG(V4L2, Info)
- << "Zero sequence expected for first frame (got "
- << buf.sequence << ")";
- firstFrame_ = buf.sequence;
- }
- metadata.sequence -= firstFrame_.value();
-
Span<const FrameBuffer::Plane> framebufferPlanes = buffer->planes();
unsigned int numV4l2Planes = multiPlanar ? buf.length : 1;
@@ -1993,8 +1980,6 @@ int V4L2VideoDevice::streamOn()
{
int ret;
- firstFrame_.reset();
-
ret = ioctl(VIDIOC_STREAMON, &bufferType_);
if (ret < 0) {
LOG(V4L2, Error)