Fixed AVIF and WEBP dealloc (#9501)
This commit is contained in:
parent
d305ee6a25
commit
fcecc8c6c4
@ -425,7 +425,7 @@ end:
|
||||
return (PyObject *)self;
|
||||
}
|
||||
|
||||
PyObject *
|
||||
void
|
||||
_encoder_dealloc(AvifEncoderObject *self) {
|
||||
if (self->encoder) {
|
||||
avifEncoderDestroy(self->encoder);
|
||||
@ -433,7 +433,7 @@ _encoder_dealloc(AvifEncoderObject *self) {
|
||||
if (self->image) {
|
||||
avifImageDestroy(self->image);
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
Py_TYPE(self)->tp_free(self);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
@ -687,13 +687,13 @@ AvifDecoderNew(PyObject *self_, PyObject *args) {
|
||||
return (PyObject *)self;
|
||||
}
|
||||
|
||||
PyObject *
|
||||
void
|
||||
_decoder_dealloc(AvifDecoderObject *self) {
|
||||
if (self->decoder) {
|
||||
avifDecoderDestroy(self->decoder);
|
||||
}
|
||||
PyBuffer_Release(&self->buffer);
|
||||
Py_RETURN_NONE;
|
||||
Py_TYPE(self)->tp_free(self);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
|
||||
@ -219,6 +219,7 @@ _anim_encoder_dealloc(PyObject *self) {
|
||||
WebPAnimEncoderObject *encp = (WebPAnimEncoderObject *)self;
|
||||
WebPPictureFree(&(encp->frame));
|
||||
WebPAnimEncoderDelete(encp->enc);
|
||||
Py_TYPE(self)->tp_free(self);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
@ -441,6 +442,7 @@ _anim_decoder_dealloc(PyObject *self) {
|
||||
WebPAnimDecoderObject *decp = (WebPAnimDecoderObject *)self;
|
||||
WebPDataClear(&(decp->data));
|
||||
WebPAnimDecoderDelete(decp->dec);
|
||||
Py_TYPE(self)->tp_free(self);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
|
||||
Loading…
Reference in New Issue
Block a user