Repository navigation
fix(export): make a GIF with looping off play only once - #1197
Conversation
The export wrote the Netscape 2.0 loop block with a count of 1 for a GIF with looping off. Chromium, Firefox and ffmpeg's -loop read that count as repeats after the first play, so the GIF played twice. loop_count now means how many times the GIF plays: 0 forever, 1 once (no block), n writes n - 1 repeats.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
A GIF exported with looping off played twice instead of once.
Cause
gifLoop: falsetoloopCount: 1.-loopconvention) read that count as repeats after the first play, so 1 meant two plays.Fix
loop_countnow means how many times the GIF plays:0or absent forever,1once,nn times.netscape_repeats, maps it to the block: a count of 0 for forever, no block at all for once,n - 1for n plays.1for "once", so the dialog, the CLI and MCP are all fixed with no change there.loopCountdoc comments incontracts.ts,addon.d.tsand the napi input now say plays, not loops.cli.md, the e2e checklist) already promised "plays once"; this makes them true.Evidence
gifLoop: false, on build run 38553956428, carriedNETSCAPE2.0 03 01 01 00, a count of 1.Related issue
Found while verifying the MCP GIF export (#1192) in the e2e pass (#1191).
Type of change
Release impact
Desktop impact
Testing
cargo test -p openscreen-compositor --lib gif_export: 21 pass, including a newa_gif_that_plays_once_carries_no_loop_block.🤖 Generated with Claude Code
Summary by CodeRabbit
0plays indefinitely,1plays once, and higher values play that many times.