mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:07:45 +00:00
LibGfx: Rename "skip_marker_with_length" to "skip_segment"
As it, in fact, does not skip a marker but a segment :^).
This commit is contained in:
parent
9096b4d893
commit
90573652fd
1 changed files with 2 additions and 2 deletions
|
@ -851,7 +851,7 @@ static ErrorOr<void> read_quantization_table(AK::SeekableStream& stream, JPEGLoa
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
static ErrorOr<void> skip_marker_with_length(Stream& stream)
|
static ErrorOr<void> skip_segment(Stream& stream)
|
||||||
{
|
{
|
||||||
u16 bytes_to_skip = TRY(stream.read_value<BigEndian<u16>>()) - 2;
|
u16 bytes_to_skip = TRY(stream.read_value<BigEndian<u16>>()) - 2;
|
||||||
TRY(stream.discard(bytes_to_skip));
|
TRY(stream.discard(bytes_to_skip));
|
||||||
|
@ -1161,7 +1161,7 @@ static ErrorOr<void> parse_header(AK::SeekableStream& stream, JPEGLoadingContext
|
||||||
case JPEG_SOS:
|
case JPEG_SOS:
|
||||||
return read_start_of_scan(stream, context);
|
return read_start_of_scan(stream, context);
|
||||||
default:
|
default:
|
||||||
if (auto result = skip_marker_with_length(stream); result.is_error()) {
|
if (auto result = skip_segment(stream); result.is_error()) {
|
||||||
dbgln_if(JPEG_DEBUG, "{}: Error skipping marker: {:x}!", TRY(stream.tell()), marker);
|
dbgln_if(JPEG_DEBUG, "{}: Error skipping marker: {:x}!", TRY(stream.tell()), marker);
|
||||||
return result.release_error();
|
return result.release_error();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue