summaryrefslogtreecommitdiff
path: root/v4l2-apps
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-12-01 18:10:54 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-01 18:10:54 -0200
commitaa3b895fc0f85de57a4731cee25f28ac5961ac52 (patch)
treee6c5c0f177089fe1eaa3507746bba3979735908e /v4l2-apps
parent0474d1f738c26830c5315f191a1a3b4340026f64 (diff)
downloadmediapointer-dvb-s2-aa3b895fc0f85de57a4731cee25f28ac5961ac52.tar.gz
mediapointer-dvb-s2-aa3b895fc0f85de57a4731cee25f28ac5961ac52.tar.bz2
Fix driver_test for a non-compliance on bttv driver
From: Mauro Carvalho Chehab <mchehab@infradead.org> bttv driver presents a non-compliance: When S_FMT is called, pix.sizeimage reports a different size than when QUERYBUF is called, for the same S_FMT. The current code can work fine with this non-compliance, but an error should be reported. Those are the reports from bttv driver, by running driver-test: FMT SET: 640x480, fourcc=YVU9, 640 bytes/line, 345600 bytes/frame, colorspace=0x00000000 <snip/> QUERYBUF: 00:00:00.00000000 index=0, type=video-cap, bytesused=0, flags=0x00000000, field=any, sequence=0, memory=mmap, offset=0x00000000, length=348160 TIMECODE: 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000 QUERYBUF: ERROR: VIDIOC_S_FMT said buffer should have 345600 size, but received 348160 from QUERYBUF! Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l2-apps')
-rw-r--r--v4l2-apps/lib/v4l2_driver.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/v4l2-apps/lib/v4l2_driver.c b/v4l2-apps/lib/v4l2_driver.c
index 7d6b549a2..b57d0b02e 100644
--- a/v4l2-apps/lib/v4l2_driver.c
+++ b/v4l2-apps/lib/v4l2_driver.c
@@ -619,13 +619,8 @@ int v4l2_mmap_bufs(struct v4l2_driver *drv, unsigned int num_buffers)
if (drv->sizeimage != p->length) {
if (drv->sizeimage < p->length) {
- fprintf (stderr, "QUERYBUF: Expecting %d size, received %d buff length (LESS THAN ALLOCATED!)\n",
+ fprintf (stderr, "QUERYBUF: ERROR: VIDIOC_S_FMT said buffer should have %d size, but received %d from QUERYBUF!\n",
drv->sizeimage, p->length);
-
- free (drv->v4l2_bufs[drv->n_bufs]);
- v4l2_free_bufs(drv);
-
- return -1;
} else {
fprintf (stderr, "QUERYBUF: Expecting %d size, received %d buff length\n",
drv->sizeimage, p->length);
@@ -699,7 +694,7 @@ int v4l2_rcvbuf(struct v4l2_driver *drv, v4l2_recebe_buffer *rec_buf)
int v4l2_start_streaming(struct v4l2_driver *drv)
{
uint32_t i;
- struct v4l2_buffer buf;
+ struct v4l2_buffer buf;
if (drv->debug)
printf("Activating %d queues\n", drv->n_bufs);