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,