On Fri Jul 21 20:10:08 2023 +0000, Esme Povirk wrote:
I don't understand the redesign here. I guess this would enable default values other than 0, but afaict the code doesn't make use of that. Am I missing something?
Assuming the property is not present... - Currently `x = get_gif_frame_property(frm, fmt, prop);` will result in `x` being 0. - With this change, `get_gif_frame_property(frm, fmt, prop, &x);` will leave `x` unchanged. - Alternately (and more repetitiously) this could be implemented with a default parameter, and pass in the original value: `x = get_gif_frame_property(frm, fmt, prop, x);`
This functionality is made use of in the following commit. To create the data for `PropertyTagFrameDelay`, we loop over a set of frames, and create a list of delays, one per frame. If a delay is not specified for a frame, it will get the same delay as the previous frame. So if we have (GCE w/ delay:10) (frame 1 image) (frame 2 image), we should get [10, 10] for the delays, but we currently get [10, 0].