Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for compatibility with libx265 4.0 #1314

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions libheif/plugins/encoder_x265.cc
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,20 @@ static struct heif_error x265_encode_image(void* encoder_raw, const struct heif_

encoder->encoder = api->encoder_open(param);

#if X265_BUILD >= 212
x265_picture* out_pic = NULL;
api->encoder_encode(encoder->encoder,
&encoder->nals,
&encoder->num_nals,
pic,
&out_pic);
#else
api->encoder_encode(encoder->encoder,
&encoder->nals,
&encoder->num_nals,
pic,
NULL);
#endif

api->picture_free(pic);
api->param_free(param);
Expand Down Expand Up @@ -967,11 +976,20 @@ static struct heif_error x265_get_compressed_data(void* encoder_raw, uint8_t** d
encoder->nal_output_counter = 0;


#if X265_BUILD >= 212
x265_picture* out_pic = NULL;
int result = api->encoder_encode(encoder->encoder,
&encoder->nals,
&encoder->num_nals,
NULL,
&out_pic);
#else
int result = api->encoder_encode(encoder->encoder,
&encoder->nals,
&encoder->num_nals,
NULL,
NULL);
#endif
if (result <= 0) {
*data = nullptr;
*size = 0;
Expand Down
Loading