navidrome/core/stream
Deluan 79fc6fed60 fix(stream): keep the headroom in the estimated content length
5686c352c changed the estimate from bitRate / 8 * 1024 to * 1000, reading the
1024 as a unit mistake. It was headroom: the body also carries the ID3 tag, the
Xing frame and frame padding, so a nominal-size estimate is short, and net/http
aborts a response that writes past its declared Content-Length. Measured on a
live server, a 429s track at 64kbps was estimated at 3,439,840 bytes against a
3,441,569-byte body, and the stream was cut with 'http: wrote more than the
declared Content-Length'.

Restores the 1024, says why next to it, and turns the test into one that
asserts the headroom rather than a formula.
2026-09-24 17:16:41 -04:00
..
aliases.go fix: use ADTS for AAC transcoding, temporarily exclude AAC from transcode decisions (#5167) 2026-03-11 09:26:32 -04:00
aliases_test.go fix: use ADTS for AAC transcoding, temporarily exclude AAC from transcode decisions (#5167) 2026-03-11 09:26:32 -04:00
codec.go fix(subsonic): omit bit depth for lossy targets in transcode decision (#5768) 2026-07-12 13:27:01 -04:00
codec_test.go fix(transcoding): clamp target channels to codec limit (#5336) (#5345) 2026-04-11 23:15:07 -04:00
decider.go fix(jellyfin): match Jellyfin on login SessionInfo, item types and universal streams (#6161) 2026-09-17 23:48:39 -04:00
decider_test.go fix(subsonic): don't re-encode a source already in the player's forced format 2026-09-07 14:56:41 -04:00
legacy_client.go fix(jellyfin): match Jellyfin on login SessionInfo, item types and universal streams (#6161) 2026-09-17 23:48:39 -04:00
legacy_client_test.go fix(jellyfin): match Jellyfin on login SessionInfo, item types and universal streams (#6161) 2026-09-17 23:48:39 -04:00
limitations.go refactor: rename core/transcode to core/stream, simplify MediaStreamer (#5166) 2026-03-09 22:22:58 -04:00
limiter.go fix(transcoding): cap concurrent transcodes to prevent ffmpeg DoS (#5522) 2026-05-24 00:24:30 -03:00
limiter_test.go fix(transcoding): cap concurrent transcodes to prevent ffmpeg DoS (#5522) 2026-05-24 00:24:30 -03:00
media_streamer.go fix(stream): keep the headroom in the estimated content length 2026-09-24 17:16:41 -04:00
media_streamer_test.go fix(stream): keep the headroom in the estimated content length 2026-09-24 17:16:41 -04:00
stream_suite_test.go refactor: rename core/transcode to core/stream, simplify MediaStreamer (#5166) 2026-03-09 22:22:58 -04:00
token.go refactor(stream): remove dead type branches from getIntClaim (#5594) 2026-06-10 23:15:58 -04:00
token_test.go feat(jellyfin): non-expiring, audience-scoped tokens revocable by password change (#6013) 2026-08-22 20:36:24 -04:00
types.go fix(subsonic): don't re-encode a source already in the player's forced format 2026-09-07 14:56:41 -04:00
types_test.go fix(subsonic): don't re-encode a source already in the player's forced format 2026-09-07 14:56:41 -04:00