jpeg: make encoder work with libjpeg v7
authorStefan Kost <ensonic@users.sf.net>
Fri, 24 Jul 2009 07:47:44 +0000 (10:47 +0300)
committerStefan Kost <ensonic@users.sf.net>
Fri, 24 Jul 2009 07:50:13 +0000 (10:50 +0300)
We have to specify do_fancy_downsampling = FALSE in the encoder with did not exist before.

ext/jpeg/gstjpegenc.c

index 6e46b96..bac2292 100644 (file)
@@ -473,6 +473,10 @@ gst_jpegenc_chain (GstPad * pad, GstBuffer * buf)
   jpegenc->jdest.next_output_byte = GST_BUFFER_DATA (outbuf);
   jpegenc->jdest.free_in_buffer = GST_BUFFER_SIZE (outbuf);
 
+  /* prepare for raw input */
+#if JPEG_LIB_VERSION >= 70
+  jpegenc->cinfo.do_fancy_downsampling = FALSE;
+#endif
   jpegenc->cinfo.smoothing_factor = jpegenc->smoothing;
   jpegenc->cinfo.dct_method = jpegenc->idct_method;
   jpeg_set_quality (&jpegenc->cinfo, jpegenc->quality, TRUE);