summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/gstv4l2src.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/v4l2/gstv4l2src.c')
-rw-r--r--sys/v4l2/gstv4l2src.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index 1178f5a8..581ef5ca 100644
--- a/sys/v4l2/gstv4l2src.c
+++ b/sys/v4l2/gstv4l2src.c
@@ -906,6 +906,7 @@ gst_v4l2src_create (GstPushSrc * src, GstBuffer ** buf)
if (G_LIKELY (ret == GST_FLOW_OK && *buf)) {
GstClock *clock;
GstClockTime timestamp;
+ GstClockTime duration = GST_CLOCK_TIME_NONE;
GST_BUFFER_OFFSET (*buf) = v4l2src->offset++;
GST_BUFFER_OFFSET_END (*buf) = v4l2src->offset;
@@ -938,11 +939,14 @@ gst_v4l2src_create (GstPushSrc * src, GstBuffer ** buf)
timestamp -= latency;
else
timestamp = 0;
+
+ duration = latency;
}
}
/* FIXME: use the timestamp from the buffer itself! */
GST_BUFFER_TIMESTAMP (*buf) = timestamp;
+ GST_BUFFER_DURATION (*buf) = duration;
}
return ret;
}