Skip to content

Commit

Permalink
Update H26xNal.h
Browse files Browse the repository at this point in the history
  • Loading branch information
murillo128 authored Sep 18, 2024
1 parent 45434c0 commit cecec41
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/h264/H26xNal.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ constexpr uint32_t AnnexBStartCode = 0x01;

// H.264 NAL logic that can be shared with H.265 (mostly emulation prevention, annex B stream)

/**
* This reader consumes an RBSP (usually the payload of an H.26x NALU)
* and provides the unescaped bytes of the SODB, by skipping over
* `emulation_prevention_three_byte`s as necessary (H.264 section 7.4.1.1 step 1).
* Other codes (00 00 [00..02]) like start codes, as well as incomplete codes,
* are currently passed through.
*/
class RbspReader
{
public:
Expand Down Expand Up @@ -90,7 +97,7 @@ class RbspReader
return;
}

throw std::range_error("");
throw std::range_error("couldn't skip more bytes");
}

protected:
Expand Down Expand Up @@ -126,7 +133,7 @@ class RbspReader
return value;
}

throw std::range_error("");
throw std::range_error("couldn't peek more bytes");
}
private:
const uint8_t* data = nullptr;
Expand Down

0 comments on commit cecec41

Please sign in to comment.