mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 13:10:12 +08:00
Fix frame timestamp in VideoCapture::get
This commit is contained in:
parent
913a2dbdaa
commit
6fd9edc50f
@ -861,12 +861,12 @@ static int read_frame_v4l2(CvCaptureCAM_V4L* capture) {
|
|||||||
//printf("got data in buff %d, len=%d, flags=0x%X, seq=%d, used=%d)\n",
|
//printf("got data in buff %d, len=%d, flags=0x%X, seq=%d, used=%d)\n",
|
||||||
// buf.index, buf.length, buf.flags, buf.sequence, buf.bytesused);
|
// buf.index, buf.length, buf.flags, buf.sequence, buf.bytesused);
|
||||||
|
|
||||||
if (-1 == ioctl (capture->deviceHandle, VIDIOC_QBUF, &buf))
|
|
||||||
perror ("VIDIOC_QBUF");
|
|
||||||
|
|
||||||
//set timestamp in capture struct to be timestamp of most recent frame
|
//set timestamp in capture struct to be timestamp of most recent frame
|
||||||
capture->timestamp = buf.timestamp;
|
capture->timestamp = buf.timestamp;
|
||||||
|
|
||||||
|
if (-1 == ioctl (capture->deviceHandle, VIDIOC_QBUF, &buf))
|
||||||
|
perror ("VIDIOC_QBUF");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user