diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2018-11-16 15:01:08 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2018-11-19 12:34:27 +0000 |
commit | 43403038cf75086409bf7ee485ae855fd4c1c1e1 (patch) | |
tree | ea10eae91b39fd075491dfa5f8522e1ded50d7a1 /src/3rdparty/libtiff/libtiff/tif_dir.c | |
parent | 0c8d172cf34f442a1318388f751d7e0f652d7072 (diff) |
Update bundled libtiff to version 4.0.10
[ChangeLog][Third-Party Code] Bundled libtiff was updated to version 4.0.10
Change-Id: Ib1908d09fc5847381cb03418de878fafd2001a30
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/3rdparty/libtiff/libtiff/tif_dir.c')
-rw-r--r-- | src/3rdparty/libtiff/libtiff/tif_dir.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/3rdparty/libtiff/libtiff/tif_dir.c b/src/3rdparty/libtiff/libtiff/tif_dir.c index f00f808..6f0b487 100644 --- a/src/3rdparty/libtiff/libtiff/tif_dir.c +++ b/src/3rdparty/libtiff/libtiff/tif_dir.c @@ -1,5 +1,3 @@ -/* $Id: tif_dir.c,v 1.131 2017-07-11 21:38:04 erouault Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -863,14 +861,24 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY); if( fip == NULL ) /* cannot happen since TIFFGetField() already checks it */ return 0; + + /* + * We want to force the custom code to be used for custom + * fields even if the tag happens to match a well known + * one - important for reinterpreted handling of standard + * tag values in custom directories (i.e. EXIF) + */ + if (fip->field_bit == FIELD_CUSTOM) { + standard_tag = 0; + } - if( tag == TIFFTAG_NUMBEROFINKS ) + if( standard_tag == TIFFTAG_NUMBEROFINKS ) { int i; for (i = 0; i < td->td_customValueCount; i++) { uint16 val; TIFFTagValue *tv = td->td_customValues + i; - if (tv->info->field_tag != tag) + if (tv->info->field_tag != standard_tag) continue; if( tv->value == NULL ) return 0; @@ -892,16 +900,6 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) return 0; } - /* - * We want to force the custom code to be used for custom - * fields even if the tag happens to match a well known - * one - important for reinterpreted handling of standard - * tag values in custom directories (i.e. EXIF) - */ - if (fip->field_bit == FIELD_CUSTOM) { - standard_tag = 0; - } - switch (standard_tag) { case TIFFTAG_SUBFILETYPE: *va_arg(ap, uint32*) = td->td_subfiletype; @@ -1067,6 +1065,9 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) if (td->td_samplesperpixel - td->td_extrasamples > 1) { *va_arg(ap, uint16**) = td->td_transferfunction[1]; *va_arg(ap, uint16**) = td->td_transferfunction[2]; + } else { + *va_arg(ap, uint16**) = NULL; + *va_arg(ap, uint16**) = NULL; } break; case TIFFTAG_REFERENCEBLACKWHITE: |