From patchwork Tue Nov 3 04:14:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOpbWV0aCBNw6FydG9u?= X-Patchwork-Id: 1966 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Tue, 03 Nov 2009 04:14:30 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Tue, 03 Nov 2009 07:40:38 -0200 (BRST) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1N5Amr-0000VU-Ty; Tue, 03 Nov 2009 04:14:30 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757893AbZKCEOS (ORCPT + 1 other); Mon, 2 Nov 2009 23:14:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757892AbZKCEOS (ORCPT ); Mon, 2 Nov 2009 23:14:18 -0500 Received: from mail01d.mail.t-online.hu ([84.2.42.6]:53852 "EHLO mail01d.mail.t-online.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757176AbZKCEOR (ORCPT ); Mon, 2 Nov 2009 23:14:17 -0500 Received: from [192.168.1.64] (dsl5402C4D0.pool.t-online.hu [84.2.196.208]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail01d.mail.t-online.hu (Postfix) with ESMTPSA id 6A2E1758A40; Tue, 3 Nov 2009 05:14:08 +0100 (CET) Message-ID: <4AEFAE1A.2010600@freemail.hu> Date: Tue, 03 Nov 2009 05:14:18 +0100 From: =?ISO-8859-2?Q?N=E9meth_M=E1rton?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.8.1.21) Gecko/20090402 SeaMonkey/1.1.16 MIME-Version: 1.0 To: V4L Mailing List , Franck Bourdonnec , Jean-Francois Moine Subject: [PATCH] pixfmt-test: fix VIDIOC_G_STD call for webcams X-DCC-mail.t-online.hu-Metrics: mail01d.mail.t-online.hu 32711; Body=3 Fuz1=3 Fuz2=3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Márton Németh 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 --- -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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