mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:47:45 +00:00
LibGfx/JPEGXL: Align the stream to byte boundary before reading a frame
As this is stated in the spec, all frames are byte-aligned.
This commit is contained in:
parent
ea88242d1c
commit
9975bdb2d1
1 changed files with 4 additions and 0 deletions
|
@ -1456,6 +1456,10 @@ static ErrorOr<Frame> read_frame(LittleEndianInputBitStream& stream,
|
||||||
ImageMetadata const& metadata,
|
ImageMetadata const& metadata,
|
||||||
Optional<EntropyDecoder>& entropy_decoder)
|
Optional<EntropyDecoder>& entropy_decoder)
|
||||||
{
|
{
|
||||||
|
// F.1 - General
|
||||||
|
// Each Frame is byte-aligned by invoking ZeroPadToByte() (B.2.7)
|
||||||
|
stream.align_to_byte_boundary();
|
||||||
|
|
||||||
Frame frame;
|
Frame frame;
|
||||||
|
|
||||||
frame.frame_header = TRY(read_frame_header(stream, metadata));
|
frame.frame_header = TRY(read_frame_header(stream, metadata));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue