summaryrefslogtreecommitdiff
path: root/libavdevice/kmsgrab.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavdevice/kmsgrab.c')
-rw-r--r--libavdevice/kmsgrab.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavdevice/kmsgrab.c b/libavdevice/kmsgrab.c
index 94e32b9cae..6cc305b16f 100644
--- a/libavdevice/kmsgrab.c
+++ b/libavdevice/kmsgrab.c
@@ -268,7 +268,7 @@ static int kmsgrab_read_packet(AVFormatContext *avctx, AVPacket *pkt)
int64_t now;
int err;
- now = av_gettime();
+ now = av_gettime_relative();
if (ctx->frame_last) {
int64_t delay;
while (1) {
@@ -276,10 +276,11 @@ static int kmsgrab_read_packet(AVFormatContext *avctx, AVPacket *pkt)
if (delay <= 0)
break;
av_usleep(delay);
- now = av_gettime();
+ now = av_gettime_relative();
}
}
ctx->frame_last = now;
+ now = av_gettime();
plane = drmModeGetPlane(ctx->hwctx->fd, ctx->plane_id);
if (!plane) {