From 7ddafe6c107eb5e1b4e82b182714625d1ee24f15 Mon Sep 17 00:00:00 2001 From: Andrey Kiselev Date: Thu, 12 Oct 2006 18:02:52 +0000 Subject: [PATCH] Save the state of printdir codec dependent method as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1273 --- libtiff/tif_jpeg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c index ae6d9d8f..e41d9130 100644 --- a/libtiff/tif_jpeg.c +++ b/libtiff/tif_jpeg.c @@ -1,4 +1,4 @@ -/* $Id: tif_jpeg.c,v 1.49 2006-10-12 15:36:14 dron Exp $ */ +/* $Id: tif_jpeg.c,v 1.50 2006-10-12 18:02:52 dron Exp $ */ /* * Copyright (c) 1994-1997 Sam Leffler @@ -152,6 +152,7 @@ typedef struct { TIFFVGetMethod vgetparent; /* super-class method */ TIFFVSetMethod vsetparent; /* super-class method */ + TIFFPrintMethod printdir; /* super-class method */ TIFFStripMethod defsparent; /* super-class method */ TIFFTileMethod deftparent; /* super-class method */ /* pseudo-tag fields */ @@ -1567,6 +1568,7 @@ JPEGCleanup(TIFF* tif) tif->tif_tagmethods.vgetfield = sp->vgetparent; tif->tif_tagmethods.vsetfield = sp->vsetparent; + tif->tif_tagmethods.printdir = sp->printdir; if( sp->cinfo_initialized ) TIFFjpeg_destroy(sp); /* release libjpeg resources */ @@ -1924,7 +1926,8 @@ TIFFInitJPEG(TIFF* tif, int scheme) tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (JPEGState)); if (tif->tif_data == NULL) { - TIFFErrorExt(tif->tif_clientdata, "TIFFInitJPEG", "No space for JPEG state block"); + TIFFErrorExt(tif->tif_clientdata, + "TIFFInitJPEG", "No space for JPEG state block"); return (0); } _TIFFmemset( tif->tif_data, 0, sizeof(JPEGState)); @@ -1941,6 +1944,7 @@ TIFFInitJPEG(TIFF* tif, int scheme) tif->tif_tagmethods.vgetfield = JPEGVGetField; /* hook for codec tags */ sp->vsetparent = tif->tif_tagmethods.vsetfield; tif->tif_tagmethods.vsetfield = JPEGVSetField; /* hook for codec tags */ + sp->printdir = tif->tif_tagmethods.printdir; tif->tif_tagmethods.printdir = JPEGPrintDir; /* hook for codec tags */ /* Default values for codec-specific fields */