Skip to content

Commit

Permalink
fix for older AOM versions with non-const parameter for aom_codec_err…
Browse files Browse the repository at this point in the history
…or()
  • Loading branch information
farindk committed Feb 19, 2025
1 parent e172d6b commit f17d037
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libheif/plugins/encoder_aom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,8 @@ void aom_query_input_colorspace2(void* encoder_raw, heif_colorspace* colorspace,
}

// returns 'true' when an error was detected
static bool check_aom_error(aom_codec_err_t aom_error, const aom_codec_ctx_t* codec, encoder_struct_aom* encoder, struct heif_error* heif_error)
// Note: some older AOM versions take a non-const pointer to aom_codec_error(). Thus, we also have to use a non-const pointer here.
static bool check_aom_error(aom_codec_err_t aom_error, /*const*/ aom_codec_ctx_t* codec, encoder_struct_aom* encoder, struct heif_error* heif_error)
{
if (aom_error == AOM_CODEC_OK) {
return false;
Expand Down

0 comments on commit f17d037

Please sign in to comment.