mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Refactor std/png decoder.tell_me_more
This commit is contained in:
1 parent
72d4a9e769
commit
5d1473a2ca
2 files changed
+36
-32
No files matched your search
+15
-13
@@ -1651,21 +1651,23 @@ pub func decoder.tell_me_more?(dst: base.io_writer, minfo: nptr base.more_inform
|
||||
this.metadata_is_zlib_compressed = true
|
||||
}
|
||||
|
||||
} else {
|
||||
if this.chunk_length <> 0 {
|
||||
return "#bad chunk"
|
||||
}
|
||||
|
||||
// Skip the ancillary chunk's CRC-32 checksum.
|
||||
args.src.skip?(n: 4)
|
||||
|
||||
this.metadata_flavor = 0
|
||||
this.metadata_fourcc = 0
|
||||
this.metadata_x = 0
|
||||
this.metadata_y = 0
|
||||
this.metadata_z = 0
|
||||
this.call_sequence = 2
|
||||
return ok
|
||||
}
|
||||
|
||||
if this.chunk_length <> 0 {
|
||||
return "#bad chunk"
|
||||
}
|
||||
|
||||
// Skip the ancillary chunk's CRC-32 checksum.
|
||||
args.src.skip?(n: 4)
|
||||
|
||||
this.metadata_flavor = 0
|
||||
this.metadata_fourcc = 0
|
||||
this.metadata_x = 0
|
||||
this.metadata_y = 0
|
||||
this.metadata_z = 0
|
||||
|
||||
this.call_sequence = 2
|
||||
return ok
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user