From 9c3981368e02a3595d292d4b9c1d39dec5693556 Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Wed, 30 Oct 2024 18:58:36 +0100 Subject: [PATCH] x265 has reverted the change to encode_encode() --- libheif/plugins/encoder_x265.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libheif/plugins/encoder_x265.cc b/libheif/plugins/encoder_x265.cc index 9538794639..decf8acd7a 100644 --- a/libheif/plugins/encoder_x265.cc +++ b/libheif/plugins/encoder_x265.cc @@ -909,7 +909,9 @@ static struct heif_error x265_encode_image(void* encoder_raw, const struct heif_ encoder->encoder = api->encoder_open(param); -#if X265_BUILD >= 212 +#if X265_BUILD == 212 + // In x265 build version 212, the signature of the encoder_encode() function was changed. But it was changed back in version 213. + // https://bitbucket.org/multicoreware/x265_git/issues/952/crash-in-libheif-tests x265_picture* out_pic = NULL; api->encoder_encode(encoder->encoder, &encoder->nals, @@ -984,7 +986,7 @@ static struct heif_error x265_get_compressed_data(void* encoder_raw, uint8_t** d encoder->nal_output_counter = 0; -#if X265_BUILD >= 212 +#if X265_BUILD == 212 x265_picture* out_pic = NULL; int result = api->encoder_encode(encoder->encoder, &encoder->nals,