Skip to content

Commit

Permalink
Check avifAlloc() success in aomCodecEncodeImage()
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
y-guyon committed Oct 6, 2023
1 parent 55aab4a commit 1a6342e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/codec_aom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,7 @@ static avifResult aomCodecEncodeImage(avifCodec * codec,
size_t monoUVSize = (size_t)monoUVHeight * monoUVRowBytes;

monoUVPlane = avifAlloc(monoUVSize);
AVIF_CHECKERR(monoUVPlane != NULL, AVIF_RESULT_OUT_OF_MEMORY); // No need for aom_img_free() because !aomImageAllocated
aomImage.planes[1] = monoUVPlane;
aomImage.stride[1] = monoUVRowBytes;
}
Expand Down

0 comments on commit 1a6342e

Please sign in to comment.