All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug in xawtv with libjpeg v8
@ 2011-10-07 14:34 Markus Königshaus
  0 siblings, 0 replies; only message in thread
From: Markus Königshaus @ 2011-10-07 14:34 UTC (permalink / raw)
  To: linux-media

[-- 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*));

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

only message in thread, other threads:[~2011-10-07 14:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-07 14:34 Bug in xawtv with libjpeg v8 Markus Königshaus

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.