All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Markus Königshaus" <m.koenigshaus@wut.de>
To: linux-media@vger.kernel.org
Subject: Bug in xawtv with libjpeg v8
Date: Fri, 07 Oct 2011 16:34:01 +0200	[thread overview]
Message-ID: <4E8F0DD9.9070402@wut.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

Using streamer from xawtv-3.102 segfaults with jpeg-output and libjpeg 
v8. Attached patch will resolve the problem.

Regards, Markus

-- Unsere Aussagen koennen Irrtuemer und Missverstaendnisse enthalten.
Bitte pruefen Sie die Aussagen fuer Ihren Fall, bevor Sie Entscheidungen 
auf Grundlage dieser Aussagen treffen.
Wiesemann & Theis GmbH, Porschestr. 12, D-42279 Wuppertal
Geschaeftsfuehrer: Dipl.-Ing. Ruediger Theis
Registergericht: Amtsgericht Wuppertal, HRB 6377 
Tel. +49-202/2680-0, Fax +49-202/2680-265, http://www.wut.de

[-- Attachment #2: xawtv-3.102-conv-mjpeg_c.patch --]
[-- Type: text/x-patch, Size: 974 bytes --]

from https://bugs.gentoo.org/show_bug.cgi?id=294488
[...]
explicitly set do_fancy_downsampling to FALSE 

Apparently, when settings dinfo.raw_data_in,
previous version jpeg automatically set dinfo.do_fancy_downsampling to
FALSE. Newer versions (since 7) of media-libs/jpeg do not do that anymore and
the program must do it explicitly (although I have not found any documentation
to that effect). 

Compile tested only, but a similar fix in mjpegtools (but output rather than
input) works.
--- xawtv-3.102.org/libng/plugins/conv-mjpeg.c	2011-09-05 19:26:02.000000000 +0200
+++ xawtv-3.102/libng/plugins/conv-mjpeg.c	2011-10-07 15:57:52.413003003 +0200
@@ -229,6 +229,7 @@
     jpeg_set_quality(&h->mjpg_cinfo, ng_jpeg_quality, TRUE);
 
     h->mjpg_cinfo.raw_data_in = TRUE;
+    h->mjpg_cinfo.do_fancy_downsampling = FALSE;  // fix segfaulst with libjpeg v7++
     jpeg_set_colorspace(&h->mjpg_cinfo,JCS_YCbCr);
 
     h->mjpg_ptrs[0] = malloc(h->fmt.height*sizeof(char*));

                 reply	other threads:[~2011-10-07 14:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E8F0DD9.9070402@wut.de \
    --to=m.koenigshaus@wut.de \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.