mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 10:27:08 +02:00
The inserted Info frame reused the first audio frame's header, and so its size. A VBR encode at 22050Hz that starts on silence opens with an 8kbps frame of 26 bytes, while the tag needs 33, so building the frame panicked with an index out of range. Reproduced with ffmpeg -ar 22050 -q:a 9 on a quiet input. The frame now keeps the first frame's version, sample rate and channel mode but raises the bitrate until the frame is big enough for the tag, which is what ffmpeg's own mp3 muxer does. The frame count is unaffected, and decoded audio of the reproducing file is byte-identical after the patch. |
||
|---|---|---|
| .. | ||
| ffmpeg.go | ||
| ffmpeg_test.go | ||
| flac_streaminfo.go | ||
| flac_streaminfo_test.go | ||
| mp3_xing.go | ||
| mp3_xing_test.go | ||
| piped_header.go | ||