From 2c9eeef178ad598689a9e669a434f707488128fd Mon Sep 17 00:00:00 2001 From: stan Date: Wed, 20 Jan 2010 14:43:54 +0000 Subject: [PATCH] Updated JPEG memory functions to not conflict with new libjpeg8 functions. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3012 e3e1d417-86f3-4887-817a-d78f3d33393f --- src/zm_image.cpp | 4 ++-- src/zm_jpeg.c | 6 +++--- src/zm_jpeg.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index c37a450f7..d7524a90f 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -461,7 +461,7 @@ bool Image::DecodeJpeg( const JOCTET *inbuffer, int inbuffer_size ) return( false ); } - jpeg_mem_src( cinfo, inbuffer, inbuffer_size ); + zm_jpeg_mem_src( cinfo, inbuffer, inbuffer_size ); jpeg_read_header( cinfo, TRUE ); @@ -523,7 +523,7 @@ bool Image::EncodeJpeg( JOCTET *outbuffer, int *outbuffer_size, int quality_over jpeg_create_compress( cinfo ); } - jpeg_mem_dest( cinfo, outbuffer, outbuffer_size ); + zm_jpeg_mem_dest( cinfo, outbuffer, outbuffer_size ); cinfo->image_width = width; /* image width and height, in pixels */ cinfo->image_height = height; diff --git a/src/zm_jpeg.c b/src/zm_jpeg.c index e79e49935..a7517c5df 100644 --- a/src/zm_jpeg.c +++ b/src/zm_jpeg.c @@ -172,7 +172,7 @@ static void term_destination (j_compress_ptr cinfo) * for closing it after finishing compression. */ -void jpeg_mem_dest (j_compress_ptr cinfo, JOCTET *outbuffer, int *outbuffer_size ) +void zm_jpeg_mem_dest (j_compress_ptr cinfo, JOCTET *outbuffer, int *outbuffer_size ) { mem_dest_ptr dest; @@ -349,12 +349,12 @@ static void term_source (j_decompress_ptr cinfo) * for closing it after finishing decompression. */ -void jpeg_mem_src( j_decompress_ptr cinfo, const JOCTET *inbuffer, int inbuffer_size ) +void zm_jpeg_mem_src( j_decompress_ptr cinfo, const JOCTET *inbuffer, int inbuffer_size ) { mem_src_ptr src; /* The source object and input buffer are made permanent so that a series - * of JPEG images can be read from the same file by calling jpeg_mem_src + * of JPEG images can be read from the same file by calling zm_jpeg_mem_src * only before the first one. (If we discarded the buffer at the end of * one image, we'd likely lose the start of the next one.) * This makes it unsafe to use this manager and a different source diff --git a/src/zm_jpeg.h b/src/zm_jpeg.h index f736b6350..4d32498d4 100644 --- a/src/zm_jpeg.h +++ b/src/zm_jpeg.h @@ -36,5 +36,5 @@ void zm_jpeg_error_exit( j_common_ptr cinfo ); void zm_jpeg_emit_message( j_common_ptr cinfo, int msg_level ); // Prototypes for memory compress/decompression object */ -void jpeg_mem_src(j_decompress_ptr cinfo, const JOCTET *inbuffer, int inbuffer_size ); -void jpeg_mem_dest(j_compress_ptr cinfo, JOCTET *outbuffer, int *outbuffer_size ); +void zm_jpeg_mem_src(j_decompress_ptr cinfo, const JOCTET *inbuffer, int inbuffer_size ); +void zm_jpeg_mem_dest(j_compress_ptr cinfo, JOCTET *outbuffer, int *outbuffer_size );