C14.7 r3: inline GIFs end at a bad frame too; C14.7 [~]
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
37e2dfd5e3
commit
71c5d809f5
5 files changed
+27
-13
No files matched your search
Vendored
+3
-4
@@ -3277,14 +3277,13 @@ impl Image {
|
||||
}
|
||||
frames.push(frame);
|
||||
}
|
||||
Err(err) => {
|
||||
log::debug!("Skipping GIF frame due to decode error: {err}");
|
||||
}
|
||||
// A bad frame ends it: the decoder may never stop.
|
||||
Err(err) => return Err(err.into()),
|
||||
}
|
||||
}
|
||||
|
||||
if frames.is_empty() {
|
||||
anyhow::bail!("GIF could not be decoded: all frames failed");
|
||||
anyhow::bail!("GIF could not be decoded: no frames");
|
||||
}
|
||||
|
||||
frames
|
||||
|
||||
Reference in new issue
Block a user