Commit 9b0788aa84 for aom

commit 9b0788aa845842dd91de9ef947ba7e0cd330d89e
Author: Wan-Teh Chang <wtc@google.com>
Date:   Mon Feb 23 13:59:02 2026 -0800

    Do not replace error code with AOM_CODEC_ERROR

    Forward the error code returned by
    aom_get_num_layers_from_operating_point_idc(). Do not replace it with
    AOM_CODEC_ERROR.

    Change-Id: I278f501398ff411b35db3cb618d6048ef0651510

diff --git a/av1/av1_dx_iface.c b/av1/av1_dx_iface.c
index bd7eaeef78..be4b1a7d92 100644
--- a/av1/av1_dx_iface.c
+++ b/av1/av1_dx_iface.c
@@ -247,13 +247,9 @@ static aom_codec_err_t parse_operating_points(struct aom_read_bit_buffer *rb,
     }
   }

-  if (aom_get_num_layers_from_operating_point_idc(
-          operating_point_idc0, &si->number_spatial_layers,
-          &si->number_temporal_layers) != AOM_CODEC_OK) {
-    return AOM_CODEC_ERROR;
-  }
-
-  return AOM_CODEC_OK;
+  return aom_get_num_layers_from_operating_point_idc(
+      operating_point_idc0, &si->number_spatial_layers,
+      &si->number_temporal_layers);
 }

 static aom_codec_err_t decoder_peek_si_internal(const uint8_t *data,
diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index 4809578095..c9d3ac16d7 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -222,10 +222,11 @@ static uint32_t read_sequence_header_obu(AV1Decoder *pbi,
     operating_point = 0;
   pbi->current_operating_point =
       seq_params->operating_point_idc[operating_point];
-  if (aom_get_num_layers_from_operating_point_idc(
-          pbi->current_operating_point, &pbi->number_spatial_layers,
-          &pbi->number_temporal_layers) != AOM_CODEC_OK) {
-    pbi->error.error_code = AOM_CODEC_ERROR;
+  aom_codec_err_t status = aom_get_num_layers_from_operating_point_idc(
+      pbi->current_operating_point, &pbi->number_spatial_layers,
+      &pbi->number_temporal_layers);
+  if (status != AOM_CODEC_OK) {
+    pbi->error.error_code = status;
     return 0;
   }