openbsd-ports/graphics/mpeg_encode/patches/patch-jpeg_c
2009-10-12 22:44:56 +00:00

33 lines
843 B
Plaintext

$OpenBSD: patch-jpeg_c,v 1.2 2009/10/12 22:44:56 naddy Exp $
--- jpeg.c.orig Sat Aug 5 01:35:07 1995
+++ jpeg.c Tue Oct 13 00:42:55 2009
@@ -65,6 +65,7 @@
*==============*/
#include <stdio.h>
+#include <unistd.h>
#include "all.h"
#include "mtypes.h"
#include "frames.h"
@@ -77,7 +78,7 @@
/* make it happier.... */
#undef DCTSIZE2
-#include "jpeg/jpeglib.h"
+#include "jpeglib.h"
#define HEADER_SIZE 607 /*JFIF header size used on output images*/
@@ -514,7 +515,11 @@ ReadJPEG(mf, fp)
#ifdef JPEG4
buffer_height = 8; /* could be 2, 4,8 rows high */
#else
+#if JPEG_LIB_VERSION < 70
buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_scaled_size;
+#else
+ buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_v_scaled_size;
+#endif
#endif
for(cp=0,compptr = cinfo.comp_info;cp<cinfo.num_components;