Skip to content

Commit

Permalink
obu: Validate obu_forbidden_bit in sequence header
Browse files Browse the repository at this point in the history
Section 6.2.2 of AV1 Specification: obu_forbidden_bit must be set to 0.
  • Loading branch information
vigneshvg committed May 2, 2024
1 parent 7be0c35 commit db8815a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/obu.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,10 @@ avifBool avifSequenceHeaderParse(avifSequenceHeader * header, const avifROData *
avifBitsInit(&bits, obus.data, obus.size);

// obu_header()
avifBitsRead(&bits, 1); // obu_forbidden_bit
const uint8_t obu_forbidden_bit = avifBitsRead(&bits, 1);
if (obu_forbidden_bit != 0) {
return AVIF_FALSE;
}
const uint32_t obu_type = avifBitsRead(&bits, 4);
const uint32_t obu_extension_flag = avifBitsRead(&bits, 1);
const uint32_t obu_has_size_field = avifBitsRead(&bits, 1);
Expand Down

0 comments on commit db8815a

Please sign in to comment.