From: Sebastian Dröge Date: Mon, 24 Dec 2012 10:54:47 +0000 (+0100) Subject: mfc: Don't require stride to be set on src parameters X-Git-Tag: 1.19.3~507^2~14312 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=048a09682f1881ac2f4e9d7ce1a56bb6363f38b8;p=platform%2Fupstream%2Fgstreamer.git mfc: Don't require stride to be set on src parameters --- diff --git a/sys/mfc/fimc/fimc.c b/sys/mfc/fimc/fimc.c index 40a72c7..cf68616 100644 --- a/sys/mfc/fimc/fimc.c +++ b/sys/mfc/fimc/fimc.c @@ -130,6 +130,8 @@ fimc_new (void) return NULL; } + GST_DEBUG ("Created new FIMC context"); + return fimc; } @@ -248,10 +250,13 @@ fimc_set_src_format (Fimc * fimc, FimcColorFormat format, int width, int height, fmt.fmt.pix_mp.field = V4L2_FIELD_ANY; fmt.fmt.pix_mp.num_planes = fimc_color_format_get_nplanes (format); - for (i = 0; i < fmt.fmt.pix_mp.num_planes; i++) { - fmt.fmt.pix_mp.plane_fmt[i].bytesperline = stride[i]; - fmt.fmt.pix_mp.plane_fmt[i].sizeimage = - fimc_color_format_get_component_height (format, i, height) * stride[i]; + if (stride) { + for (i = 0; i < fmt.fmt.pix_mp.num_planes; i++) { + fmt.fmt.pix_mp.plane_fmt[i].bytesperline = stride[i]; + fmt.fmt.pix_mp.plane_fmt[i].sizeimage = + fimc_color_format_get_component_height (format, i, + height) * stride[i]; + } } if (ioctl (fimc->fd, VIDIOC_S_FMT, &fmt) < 0) {