From: Dave Stevenson Date: Mon, 13 Feb 2017 13:11:41 +0000 (+0000) Subject: BCM2835-V4L2: Correctly denote key frames in encoded data X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~8^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f55a8d67d176cd7c29bcb06956006c7b3506206a;p=linux-4.9.git BCM2835-V4L2: Correctly denote key frames in encoded data Forward MMAL key frame flags to the V4L2 buffers. Signed-off-by: Dave Stevenson --- diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c index e69731320f4e..6bdec0806126 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -413,6 +413,9 @@ static void buffer_cb(struct vchiq_mmal_instance *instance, dev->capture.last_timestamp = buf->vb.vb2_buf.timestamp; vb2_set_plane_payload(&buf->vb.vb2_buf, 0, length); + if (mmal_flags & MMAL_BUFFER_HEADER_FLAG_KEYFRAME) + buf->vb.flags |= V4L2_BUF_FLAG_KEYFRAME; + v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, "Buffer has ts %llu", dev->capture.last_timestamp);