From: Lutz M. <lu...@us...> - 2005-05-01 17:39:36
|
Update of /cvsroot/libexif/libexif/libexif In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv872/libexif Modified Files: exif-data.c Log Message: 2005-05-01 Lutz Mueller <lu...@us...> * libexif/exif-data.c (exif_data_fix): Don't create EXIF_IFD_1 if no thumbnail data is available. Index: exif-data.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-data.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -p -d -r1.81 -r1.82 --- exif-data.c 30 Apr 2005 00:55:28 -0000 1.81 +++ exif-data.c 1 May 2005 17:39:25 -0000 1.82 @@ -1112,7 +1112,21 @@ exif_data_unset_option (ExifData *d, Exi static void fix_func (ExifContent *c, void *data) { - exif_content_fix (c); + switch (exif_content_get_ifd (c)) { + case EXIF_IFD_1: + if (c->parent->data) + exif_content_fix (c); + else { + exif_log (c->parent->priv->log, EXIF_LOG_CODE_DEBUG, "exif-data", + "No thumbnail but entries on thumbnail. These entries have been " + "removed."); + while (c->count) + exif_content_remove_entry (c, c->entries[c->count - 1]); + } + break; + default: + exif_content_fix (c); + } } void |