[Bug]: Streaming can buffer a whole file's audio before the first keyframe

Aberta
#114 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
52/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
rust

Direção de pesquisa

Start in src/media/stream.rs around line 322, where audio packets accumulate in held_audio until the first video keyframe sets video_start; trace both where video_start is assigned and where held_audio is later drained, in copy mode. Decide on a bound (packet count or duration) or a timeout for giving up on the keyframe, and keep the existing A/V sync behaviour intact. Done means memory stays bounded for a file with no keyframe flag or a far seek, verified by a test or a synthetic input rather than a live server, since the report was not reproduced.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug

[!NOTE]
This issue was written by Claude (Claude Opus 5.5) from a code review session with @PhrolovaMoe. It was found by reading the code and hasn't been reproduced on a running server.

Version

0.40.0 (feat/desktop, 017a837b)

Area

Streaming / playback

What happened?

In copy mode, audio packets wait in held_audio until the first video keyframe sets video_start (src/media/stream.rs:322). The vector has no limit, so for a file whose video packets never carry the keyframe flag (or a seek that lands far from one), the stream reads the whole file's audio into memory.

Expected behavior

Memory use stays bounded however the file is laid out.

Suggested fix

Cap held_audio (by count or duration) and drop the oldest packets, or give up waiting for a keyframe after a few seconds of input.

Linguagem predominante
TypeScript
Estrelas
4
Forks
1
Merge médio
4h 49min
PRs com merge (30d)
5

Preparar o ambiente

  • Inclui um Dockerfile ou arquivo Docker Compose
  • Sem modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de tinystream-dev/tinystream

Todas as issues de tinystream-dev/tinystream

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.