Skip to content

Commit

Permalink
b
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Feb 2, 2025
1 parent 0bcf4af commit 252a235
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/_avif.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ AvifDecoderNew(PyObject *self_, PyObject *args) {
self = PyObject_New(AvifDecoderObject, &AvifDecoder_Type);
if (!self) {
PyErr_SetString(PyExc_RuntimeError, "could not create decoder object");
PyBuffer_Release(&buffer);
return NULL;
}

Expand All @@ -681,6 +682,7 @@ AvifDecoderNew(PyObject *self_, PyObject *args) {
decoder->codecChoice = codec;

result = avifDecoderSetIOMemory(decoder, buffer.buf, buffer.len);
PyBuffer_Release(&buffer);
if (result != AVIF_RESULT_OK) {
PyErr_Format(
exc_type_for_avif_result(result),
Expand Down

0 comments on commit 252a235

Please sign in to comment.