Commit 5467ef08b4 for aom
commit 5467ef08b4a959e2e0c91a91af5c46f6ba045c3f
Author: Wan-Teh Chang <wtc@google.com>
Date: Wed May 6 14:09:09 2026 -0700
Set error detail if aom_codec_encode itself fails
Change-Id: I80a1934c92b38e24e96ab4dfaf0c8fb78b9434f2
diff --git a/aom/src/aom_encoder.c b/aom/src/aom_encoder.c
index 3b028ff49a..6ad6582de1 100644
--- a/aom/src/aom_encoder.c
+++ b/aom/src/aom_encoder.c
@@ -179,6 +179,9 @@ aom_codec_err_t aom_codec_encode(aom_codec_ctx_t *ctx, const aom_image_t *img,
else if (img && ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) != 0) !=
((ctx->init_flags & AOM_CODEC_USE_HIGHBITDEPTH) != 0)) {
res = AOM_CODEC_INVALID_PARAM;
+ ctx->priv->err_detail =
+ "img is high bit-depth and codec was not initialized with "
+ "AOM_CODEC_USE_HIGHBITDEPTH, or vice versa.";
#if ULONG_MAX > UINT32_MAX
} else if (duration > UINT32_MAX) {
res = AOM_CODEC_INVALID_PARAM;