Guard against predefined in recompress_frames

This commit is contained in:
Andrew 2025-08-08 08:54:41 +12:00
parent 7f98f7c557
commit 654552cf73

View file

@ -632,6 +632,8 @@ fn recompress_frames(
if !opts.idat_recoding || png.frames.is_empty() { if !opts.idat_recoding || png.frames.is_empty() {
return Ok(()); return Ok(());
} }
// Ensure we don't try to recompress frames with a predefined filter
debug_assert!(!matches!(filter, FilterStrategy::Predefined { .. }));
png.frames png.frames
.par_iter_mut() .par_iter_mut()
.with_max_len(1) .with_max_len(1)