Files
qbz/crates/qbz-cast
vicrodh 1261e98cc0 fix(cast): stop hoarding full-track buffers in the DLNA media server
register_audio inserted every cast track's complete bytes into the
entries map and NOTHING ever removed them — not stop, not disconnect;
only app shutdown dropped the server. A DLNA session therefore grew by
one full track per auto-advance (issue #550: 50 MB at launch to
4.5 GB, never released). Three changes:
- register_audio/register_file evict every other entry — only the
  track being cast is servable anyway.
- stop_if_cast and disconnect clear the entries outright, so stopping
  actually releases the buffers.
- MediaSource::Data is Arc-backed: the per-request entry clone no
  longer copies the whole track (it did, on every GET/HEAD/range
  request), and an in-flight response keeps its own Arc so eviction
  can never truncate an ongoing range request.

Fixes #550

cc
2026-07-05 15:08:34 -06:00
..