Use FreeBox instead of custom invalid box type Fix comment about ignoring transformative properties. Change-Id: I0ab7d215e7cd02abcc69cdef7c0d1cc6700e9639
diff --git a/README.md b/README.md index 7d17d55..d44001b 100644 --- a/README.md +++ b/README.md
@@ -54,7 +54,7 @@ not available in the PHP release version you use, you can fallback to `avifinfo.php` instead. -See `avifinfo_test.php` for a usage example. +See `tests/avifinfo_test.php` for a usage example. ### PHP test
diff --git a/avifinfo.c b/avifinfo.c index 599c019..5d7ec78 100644 --- a/avifinfo.c +++ b/avifinfo.c
@@ -372,7 +372,7 @@ (!memcmp(box->type, "infe", 4) && box->version >= 2 && box->version <= 3); // Instead of considering this file as invalid, skip unparsable boxes. - if (!is_parsable) memcpy(box->type, "\0skp", 4); // \0 so not a valid type + if (!is_parsable) memcpy(box->type, "skip", 4); // FreeSpaceBox } AVIF_DEBUG_LOG("%*c", nesting_level * 2, ' '); AVIF_DEBUG_LOG("Box type %.4s size %d\n", box->type, box->size);
diff --git a/avifinfo.h b/avifinfo.h index 0a558f0..bc17df1 100644 --- a/avifinfo.h +++ b/avifinfo.h
@@ -35,7 +35,7 @@ } AvifInfoStatus; typedef struct { - uint32_t width, height; // In number of pixels. Ignores mirror and rotation. + uint32_t width, height; // In number of pixels. Ignores crop and rotation. uint32_t bit_depth; // Likely 8, 10 or 12 bits per channel per pixel. uint32_t num_channels; // Likely 1, 2, 3 or 4 channels: // (1 monochrome or 3 colors) + (0 or 1 alpha)
diff --git a/avifinfo.php b/avifinfo.php index 81269ec..dfb67c3 100644 --- a/avifinfo.php +++ b/avifinfo.php
@@ -103,7 +103,7 @@ public $primary_item_id; public $primary_item_features = array( // Deduced from the data below. 'width' => UNDEFINED, // In number of pixels. - 'height' => UNDEFINED, // Ignores mirror and rotation. + 'height' => UNDEFINED, // Ignores crop and rotation. 'bit_depth' => UNDEFINED, // Likely 8, 10 or 12 bits per channel per pixel. 'num_channels' => UNDEFINED // Likely 1, 2, 3 or 4 channels: // (1 monochrome or 3 colors) + (0 or 1 alpha) @@ -303,7 +303,7 @@ ( $this->type == 'auxC' && $this->version <= 0 ); // Instead of considering this file as invalid, skip unparsable boxes. if ( !$is_parsable ) { - $this->type = 'unknownversion'; + $this->type = 'skip'; // FreeSpaceBox. To be ignored by readers. } } // print_r( $this ); // Uncomment to print all boxes.