Skip to content

🐛 Fix the Opus files opusinfo rejects after an artwork edit - #24

Merged
simonhull merged 2 commits into
mainfrom
fix/ogg-opusinfo
Nov 12, 2026
Merged

simonhull merged 2 commits into
mainfrom
fix/ogg-opusinfo

Conversation

@simonhull

@simonhull simonhull commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

main's write gate has failed since #22: opusinfo (added to CI by #22) rejects Opus files after ReplaceArtwork:

WARNING: Invalid picture parameters in METADATA_BLOCK_PICTURE: width (1), height (1), depth (0), and colors (0) MUST either be set to valid values or all set to 0
  • The oracle test now prints a tool's stdout when it rejects a file (opusinfo reports there, not on stderr).
  • internal/picture.Encode wrote width/height from the image but left color depth at 0. It now writes all four numeric fields only when width, height and depth are known, else all zero. imagemeta.ColorDepth reads the depth (and palette colors) from PNG, JPEG and GIF headers; GIF also reports its dimensions now. FLAC pictures had the same inconsistency (flac -t does not check it).
  • No public API change. Local: mise run check, write gate, 60 s each of FuzzWriteFLAC/FuzzWriteOgg. opusinfo/ogginfo run only in CI.

@simonhull
simonhull marked this pull request as ready for review November 12, 2026 17:48
@simonhull
simonhull merged commit d754e34 into main Nov 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant