From owner-freebsd-multimedia@FreeBSD.ORG Mon Sep 5 01:40:42 2011 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0326E106566B for ; Mon, 5 Sep 2011 01:40:42 +0000 (UTC) (envelope-from alexvpetrov@gmail.com) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) by mx1.freebsd.org (Postfix) with ESMTP id D0BB58FC12 for ; Mon, 5 Sep 2011 01:40:41 +0000 (UTC) Received: by pzk33 with SMTP id 33so13832142pzk.18 for ; Sun, 04 Sep 2011 18:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=m6xWVP5NQSXHFfU2FWN+PmqXlS8utsTHiIdWjjSvs3A=; b=cH8QlfX6MUxG9bdRE0Lxj78OgFjttS15RaVeYp0VC4YyL4swxi0sJ2srsU47HUdgfk i2UIIoReWBidjKdNEn/CAYCOIvQGDeE1fgVYjXfGEMbBQvgdeNfT4OEpTn+H0PZr42Bq QNdf9CVJ7ku79LPdSVokxvDIT66/KBmjRfIUE= Received: by 10.68.32.227 with SMTP id m3mr6335215pbi.332.1315186841313; Sun, 04 Sep 2011 18:40:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.55.103 with HTTP; Sun, 4 Sep 2011 18:40:21 -0700 (PDT) In-Reply-To: <4E6396F1.6030704@redhat.com> References: <201108311418.53651.hselasky@c2i.net> <4E6396F1.6030704@redhat.com> From: "Alex V. Petrov" Date: Mon, 5 Sep 2011 09:40:21 +0800 Message-ID: To: Hans de Goede Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-multimedia@freebsd.org Subject: Re: Fwd: I have problem with libv4l X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 01:40:42 -0000 2011/9/4 Hans de Goede > Hi, > > On 08/31/2011 02:18 PM, Hans Petter Selasky wrote: > >> >> ---------- Forwarded Message ---------- >> >> Subject: I have problem with libv4l >> Date: Wednesday 31 August 2011, 13:44:37 >> From: "Alex V. Petrov" >> To: freebsd-multimedia@freebsd.org >> CC: hselasky@freebsd.org >> >> Hi all! >> >> In June, after updating libv4l, my webcam (Mustek Gsmart mini 3) is not >> working (I use pwcview). >> >> $ pwcview >> Webcam set to: 320x240 (sif) at 5 fps >> Segmentation fault (core dumped) >> >> gdb: >> #0 0x0000000800ae1bfb in jpeg_idct_16x16 (cinfo=Variable "cinfo" is not >> available.) at jidctint.c:2760 >> 2760 outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp0, >> [New Thread 803807400 (LWP 101450/pwcview)] >> > > Hmm, this points to a bug in libjpeg, since recent versions of libv4l > have switched to using libjpeg for jpeg decompression, because of speed > reasons, except for some special cases (because some cams produce non > standard compliant JPEG data and the tinyjpeg copy bundled with libv4l > contains several patches to deal with this). > > Can you tell me the usb-id / chipset of your camera, so that I can > try to reproduce? I likely won't be able to reproduce though. What > version of libjpeg are you using, and with which compiler is it > build ? > > Can you perhaps try to reproduce this under Linux? Preferably > Fedora 15? > > There are 2 solutions to this problem: > 1) If it is specific to this webcam / chipset, add a quirk to libv4l's > quirk table to use the embedded tinyjpeg copy > > 2) Figure out what is causing libjpeg to crash and fix it. > > > With 2 being preferable since a segfault inside libjpeg (assuming it > is not the way libv4l uses libjpeg for now), does smell like a security > issue to me. > > Regards, > > Hans > ugen0.2: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON jpeg-8_3 with cc (GCC) 4.2.2 20070831 prerelease [FreeBSD] Fedora 15 will try later. -- ---------------------- Alex V. Petrov