Use a jpeg_error_mgr that lives within PreviewPersistent, instead of an

2004-11-25  Manish Singh  <yosh@gimp.org>

        * plug-ins/common/jpeg.c: Use a jpeg_error_mgr that lives within
        PreviewPersistent, instead of an automatic variable in save_image.
        Fixes bug #159076.
This commit is contained in:
Manish Singh 2004-11-26 03:16:03 +00:00 committed by Manish Singh
parent 26be95eb17
commit 7a1647b1bf
8 changed files with 27 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2004-11-25 Manish Singh <yosh@gimp.org>
* plug-ins/common/jpeg.c: Use a jpeg_error_mgr that lives within
PreviewPersistent, instead of an automatic variable in save_image.
Fixes bug #159076.
2004-11-25 Simon Budig <simon@gimp.org> 2004-11-25 Simon Budig <simon@gimp.org>
* modules/controller_linux_input.c: Add some sample code to retrieve * modules/controller_linux_input.c: Add some sample code to retrieve

View file

@ -222,6 +222,7 @@ typedef struct
typedef struct typedef struct
{ {
struct jpeg_compress_struct cinfo; struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
gint tile_height; gint tile_height;
FILE *outfile; FILE *outfile;
gboolean has_alpha; gboolean has_alpha;
@ -1711,7 +1712,8 @@ save_image (const gchar *filename,
pp->abort_me = FALSE; pp->abort_me = FALSE;
abort_me = &(pp->abort_me); abort_me = &(pp->abort_me);
jerr.pub.error_exit = background_error_exit; pp->cinfo.err = jpeg_std_error(&(pp->jerr));
pp->jerr.error_exit = background_error_exit;
g_idle_add ((GSourceFunc) background_jpeg_save, pp); g_idle_add ((GSourceFunc) background_jpeg_save, pp);

View file

@ -222,6 +222,7 @@ typedef struct
typedef struct typedef struct
{ {
struct jpeg_compress_struct cinfo; struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
gint tile_height; gint tile_height;
FILE *outfile; FILE *outfile;
gboolean has_alpha; gboolean has_alpha;
@ -1711,7 +1712,8 @@ save_image (const gchar *filename,
pp->abort_me = FALSE; pp->abort_me = FALSE;
abort_me = &(pp->abort_me); abort_me = &(pp->abort_me);
jerr.pub.error_exit = background_error_exit; pp->cinfo.err = jpeg_std_error(&(pp->jerr));
pp->jerr.error_exit = background_error_exit;
g_idle_add ((GSourceFunc) background_jpeg_save, pp); g_idle_add ((GSourceFunc) background_jpeg_save, pp);

View file

@ -222,6 +222,7 @@ typedef struct
typedef struct typedef struct
{ {
struct jpeg_compress_struct cinfo; struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
gint tile_height; gint tile_height;
FILE *outfile; FILE *outfile;
gboolean has_alpha; gboolean has_alpha;
@ -1711,7 +1712,8 @@ save_image (const gchar *filename,
pp->abort_me = FALSE; pp->abort_me = FALSE;
abort_me = &(pp->abort_me); abort_me = &(pp->abort_me);
jerr.pub.error_exit = background_error_exit; pp->cinfo.err = jpeg_std_error(&(pp->jerr));
pp->jerr.error_exit = background_error_exit;
g_idle_add ((GSourceFunc) background_jpeg_save, pp); g_idle_add ((GSourceFunc) background_jpeg_save, pp);

View file

@ -222,6 +222,7 @@ typedef struct
typedef struct typedef struct
{ {
struct jpeg_compress_struct cinfo; struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
gint tile_height; gint tile_height;
FILE *outfile; FILE *outfile;
gboolean has_alpha; gboolean has_alpha;
@ -1711,7 +1712,8 @@ save_image (const gchar *filename,
pp->abort_me = FALSE; pp->abort_me = FALSE;
abort_me = &(pp->abort_me); abort_me = &(pp->abort_me);
jerr.pub.error_exit = background_error_exit; pp->cinfo.err = jpeg_std_error(&(pp->jerr));
pp->jerr.error_exit = background_error_exit;
g_idle_add ((GSourceFunc) background_jpeg_save, pp); g_idle_add ((GSourceFunc) background_jpeg_save, pp);

View file

@ -222,6 +222,7 @@ typedef struct
typedef struct typedef struct
{ {
struct jpeg_compress_struct cinfo; struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
gint tile_height; gint tile_height;
FILE *outfile; FILE *outfile;
gboolean has_alpha; gboolean has_alpha;
@ -1711,7 +1712,8 @@ save_image (const gchar *filename,
pp->abort_me = FALSE; pp->abort_me = FALSE;
abort_me = &(pp->abort_me); abort_me = &(pp->abort_me);
jerr.pub.error_exit = background_error_exit; pp->cinfo.err = jpeg_std_error(&(pp->jerr));
pp->jerr.error_exit = background_error_exit;
g_idle_add ((GSourceFunc) background_jpeg_save, pp); g_idle_add ((GSourceFunc) background_jpeg_save, pp);

View file

@ -222,6 +222,7 @@ typedef struct
typedef struct typedef struct
{ {
struct jpeg_compress_struct cinfo; struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
gint tile_height; gint tile_height;
FILE *outfile; FILE *outfile;
gboolean has_alpha; gboolean has_alpha;
@ -1711,7 +1712,8 @@ save_image (const gchar *filename,
pp->abort_me = FALSE; pp->abort_me = FALSE;
abort_me = &(pp->abort_me); abort_me = &(pp->abort_me);
jerr.pub.error_exit = background_error_exit; pp->cinfo.err = jpeg_std_error(&(pp->jerr));
pp->jerr.error_exit = background_error_exit;
g_idle_add ((GSourceFunc) background_jpeg_save, pp); g_idle_add ((GSourceFunc) background_jpeg_save, pp);

View file

@ -222,6 +222,7 @@ typedef struct
typedef struct typedef struct
{ {
struct jpeg_compress_struct cinfo; struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
gint tile_height; gint tile_height;
FILE *outfile; FILE *outfile;
gboolean has_alpha; gboolean has_alpha;
@ -1711,7 +1712,8 @@ save_image (const gchar *filename,
pp->abort_me = FALSE; pp->abort_me = FALSE;
abort_me = &(pp->abort_me); abort_me = &(pp->abort_me);
jerr.pub.error_exit = background_error_exit; pp->cinfo.err = jpeg_std_error(&(pp->jerr));
pp->jerr.error_exit = background_error_exit;
g_idle_add ((GSourceFunc) background_jpeg_save, pp); g_idle_add ((GSourceFunc) background_jpeg_save, pp);