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.82-1+deb9u3+rpi1_jessie~5^2~297 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=447f48efd8a399ba5e6b8d47803852712f2d66d7;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);