public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pixfmt-test: fix VIDIOC_G_STD call for webcams
@ 2009-11-03  4:14 Németh Márton
  0 siblings, 0 replies; only message in thread
From: Németh Márton @ 2009-11-03  4:14 UTC (permalink / raw)
  To: V4L Mailing List, Franck Bourdonnec, Jean-Francois Moine

From: Márton Németh <nm127@freemail.hu>

Webcams may return -1 and errno=EINVAL when there is no standard which
they support. Handle this case in pixfmt-test.

Signed-off-by: Márton Németh <nm127@freemail.hu>
---
diff -r 43878f8dbfb0 v4l2-apps/test/pixfmt-test.c
--- a/v4l2-apps/test/pixfmt-test.c	Sun Nov 01 07:17:46 2009 -0200
+++ b/v4l2-apps/test/pixfmt-test.c	Tue Nov 03 05:10:52 2009 +0100
@@ -1741,8 +1741,10 @@
 		/* Errors ignored. */
 	}

+	/* Webcams may not support any standard at all, see
+	   http://v4l2spec.bytesex.org/spec/x448.htm for details */
 	if (-1 == xioctl (dev_fd, VIDIOC_G_STD, &std_id))
-		errno_exit ("VIDIOC_G_STD");
+		std_id = 0;
 }

 static void

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-03  4:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-03  4:14 [PATCH] pixfmt-test: fix VIDIOC_G_STD call for webcams Németh Márton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox