mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-09 05:38:58 +00:00
mfc: Don't require stride to be set on src parameters
This commit is contained in:
parent
dd56c6b5b6
commit
048a09682f
1 changed files with 9 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue