diff options
author | Alejandro Hernandez | 2014-08-05 08:32:53 -0500 |
---|---|---|
committer | Benoit Parrot | 2015-06-11 18:28:58 -0500 |
commit | f046f835687e006931c480a9d9f06cc5cb52ecfc (patch) | |
tree | e85eaaebd3172905089d12002889d1aa45d50def | |
parent | 5214314a7f16dcc5dcbb3483c9ac14179472a564 (diff) | |
download | vpe_tests-f046f835687e006931c480a9d9f06cc5cb52ecfc.tar.gz vpe_tests-f046f835687e006931c480a9d9f06cc5cb52ecfc.tar.xz vpe_tests-f046f835687e006931c480a9d9f06cc5cb52ecfc.zip |
Fix buffer type for crop option
This patch changes the crop feature to use the appropriate
buffer type. Without this patch the application returns an error
for all the packed formats.
Signed-off-by: Alejandro Hernandez <ajhernandez@ti.com>
-rw-r--r-- | vpetest.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -208,7 +208,7 @@ int allocBuffers( | |||
208 | *sizeimage_uv = fmt.fmt.pix_mp.plane_fmt[1].sizeimage; | 208 | *sizeimage_uv = fmt.fmt.pix_mp.plane_fmt[1].sizeimage; |
209 | } | 209 | } |
210 | 210 | ||
211 | if (type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) { | 211 | if (type == V4L2_BUF_TYPE_VIDEO_OUTPUT) { |
212 | ret = ioctl(fd, VIDIOC_S_CROP, &crop); | 212 | ret = ioctl(fd, VIDIOC_S_CROP, &crop); |
213 | if (ret < 0) | 213 | if (ret < 0) |
214 | pexit("error setting crop\n"); | 214 | pexit("error setting crop\n"); |
@@ -474,7 +474,7 @@ int main ( | |||
474 | crop.c.left = atoi (argv[10]); | 474 | crop.c.left = atoi (argv[10]); |
475 | crop.c.width = atoi (argv[11]); | 475 | crop.c.width = atoi (argv[11]); |
476 | crop.c.height = atoi (argv[12]); | 476 | crop.c.height = atoi (argv[12]); |
477 | crop.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; | 477 | crop.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; |
478 | 478 | ||
479 | interlace = atoi (argv[13]); | 479 | interlace = atoi (argv[13]); |
480 | translen = atoi (argv[14]); | 480 | translen = atoi (argv[14]); |