Remove unreachable returns after longjmp
Bug: aomedia:444707595
Change-Id: I406cdc27ec20b0317b341dce40cc70106e600605
diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index c58f6b2..5233fba 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -293,7 +293,7 @@
}
// On success, returns the tile group header size. On failure, calls
-// aom_internal_error() and returns -1.
+// aom_internal_error() and does not return.
static int32_t read_tile_group_header(AV1Decoder *pbi,
struct aom_read_bit_buffer *rb,
int *start_tile, int *end_tile,
@@ -310,7 +310,6 @@
aom_internal_error(
&pbi->error, AOM_CODEC_UNSUP_BITSTREAM,
"For OBU_FRAME type obu tile_start_and_end_present_flag must be 0");
- return -1;
}
}
if (tiles->large_scale || num_tiles == 1 ||
@@ -326,20 +325,17 @@
aom_internal_error(&pbi->error, AOM_CODEC_CORRUPT_FRAME,
"tg_start (%d) must be equal to %d", *start_tile,
pbi->next_start_tile);
- return -1;
}
if (*start_tile > *end_tile) {
aom_internal_error(
&pbi->error, AOM_CODEC_CORRUPT_FRAME,
"tg_end (%d) must be greater than or equal to tg_start (%d)", *end_tile,
*start_tile);
- return -1;
}
if (*end_tile >= num_tiles) {
aom_internal_error(&pbi->error, AOM_CODEC_CORRUPT_FRAME,
"tg_end (%d) must be less than NumTiles (%d)", *end_tile,
num_tiles);
- return -1;
}
pbi->next_start_tile = (*end_tile == num_tiles - 1) ? 0 : *end_tile + 1;
@@ -887,6 +883,9 @@
const uint8_t *frame_header = data;
uint32_t frame_header_size = 0;
ObuHeader obu_header;
+
+ assert(pbi->error.setjmp);
+
memset(&obu_header, 0, sizeof(obu_header));
pbi->seen_frame_header = 0;
pbi->next_start_tile = 0;