Make avifImageAllocatePlanes() return avifResult
To catch memory allocation failures and invalid parameters, it is
safer to return a status from avifImageAllocatePlanes() and from
avifImageCopy().
Update CHANGELOG.md.
diff --git a/src/write.c b/src/write.c
index ad2a956..2585678 100644
--- a/src/write.c
+++ b/src/write.c
@@ -683,7 +683,10 @@
if (encoder->data->items.count == 0) {
// Make a copy of the first image's metadata (sans pixels) for future writing/validation
- avifImageCopy(encoder->data->imageMetadata, firstCell, 0);
+ const avifResult copyResult = avifImageCopy(encoder->data->imageMetadata, firstCell, 0);
+ if (copyResult != AVIF_RESULT_OK) {
+ return copyResult;
+ }
// Prepare all AV1 items