[poppler] Branch 'poppler-0.10' - poppler/DCTStream.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Mar 8 04:39:42 PDT 2009


 poppler/DCTStream.cc |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 48eadefca35b3e332b4f960827069d48a775fac6
Author: Ryszard Trojnacki <rysiek at menel.com>
Date:   Sun Mar 8 12:38:42 2009 +0100

    set up the error-manager before calling jpeg_create_decompress
    
    Bug #20484

diff --git a/poppler/DCTStream.cc b/poppler/DCTStream.cc
index 2b4f9c1..6e7e0af 100644
--- a/poppler/DCTStream.cc
+++ b/poppler/DCTStream.cc
@@ -6,6 +6,7 @@
 //
 // Copyright 2005 Jeff Muizelaar <jeff at infidigm.net>
 // Copyright 2005-2008 Albert Astals Cid <aacid at kde.org>
+// Copyright 2009 Ryszard Trojnacki <rysiek at menel.com>
 //
 //========================================================================
 
@@ -74,7 +75,9 @@ static void exitErrorHandler(jpeg_common_struct *error) {
 
 void DCTStream::init()
 {
-  jpeg_create_decompress(&cinfo);
+  jpeg_std_error(&jerr);
+  jerr.error_exit = &exitErrorHandler;
+  cinfo.err = &jerr;
   src.pub.init_source = str_init_source;
   src.pub.fill_input_buffer = str_fill_input_buffer;
   src.pub.skip_input_data = str_skip_input_data;
@@ -86,9 +89,8 @@ void DCTStream::init()
   src.index = 0;
   src.abort = false;
   cinfo.src = (jpeg_source_mgr *)&src;
-  jpeg_std_error(&jerr);
-  jerr.error_exit = &exitErrorHandler;
-  cinfo.err = &jerr;
+  
+  jpeg_create_decompress(&cinfo);
   x = 0;
   row_buffer = NULL;
 }


More information about the poppler mailing list