media: nexell: fix to fill bytesperline & sizeimage for mplane format
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 29 Mar 2018 04:39:38 +0000 (13:39 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 29 Jan 2019 02:25:35 +0000 (11:25 +0900)
For multi planar format, on vidioc_s_fmt_vid_cap_mplane() callback
of nexell video driver, stride and sizeimage are not filled and
this causes failure of gst v4l2src plugin. Fix to fill bytesperline
and sizeimage for multi planar format from callback function,
vidioc_s_fmt_vid_cap_mplane().

Change-Id: Ib5871f183e37916c7725539bfd777d883fa96996
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/media/platform/nexell/nx-video.c

index c3648a66f591f35c52d409859a0c140007d69a33..4f8a8fe5322b3485a5e013eae60d0a5c64e37dce 100644 (file)
@@ -783,9 +783,10 @@ static int nx_video_set_format(struct file *file, void *fh,
        if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
                struct v4l2_pix_format_mplane *pix = &f->fmt.pix_mp;
 
+               set_plane_size_mmap(frame, &pix->plane_fmt[0].sizeimage);
                for (i = 0; i < format->num_planes; ++i) {
-                       frame->stride[i] = pix->plane_fmt[i].bytesperline;
-                       frame->size[i] = pix->plane_fmt[i].sizeimage;
+                       pix->plane_fmt[i].bytesperline = frame->stride[i];
+                       pix->plane_fmt[i].sizeimage = frame->size[i];
                }
        }