Fix gif metadata when skipping decode_image_config

This commit is contained in:
Nigel Tao committed 2022-06-03 11:43:05 +10:00
1 parent 8feb2709fa
commit ebe080c9ec
2 files changed
+2 -9

No files matched your search

+1 -5
View File
@@ -25,7 +25,6 @@ pub struct decoder? implements base.image_decoder(
// though it's conceptually part of the first decode_frame_config.
call_sequence : base.u8,
ignore_metadata : base.bool,
report_metadata_iccp : base.bool,
report_metadata_xmp : base.bool,
metadata_fourcc : base.u32,
@@ -300,8 +299,6 @@ pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_
var background_color : base.u32
var flags : base.u8
this.ignore_metadata = true
this.dirty_max_excl_y = 0
if (this.call_sequence & 0x10) <> 0 {
@@ -402,7 +399,6 @@ pri func decoder.skip_frame?(src: base.io_reader) {
// TODO: honor args.opts.
pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader, blend: base.pixel_blend, workbuf: slice base.u8, opts: nptr base.decode_frame_options) {
this.ignore_metadata = true
if this.call_sequence == 0x40 {
// No-op.
} else if this.call_sequence < 0x40 {
@@ -664,7 +660,7 @@ pri func decoder.decode_ae?(src: base.io_reader) {
this.num_animation_loops_value += 1
}
} else if this.ignore_metadata {
} else if this.call_sequence >= 0x20 {
// No-op.
} else if is_iccp and this.report_metadata_iccp {