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

オープン
#114 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
4
フォーク
1
平均マージ
4時間 49分
マージ済み PR(30日)
5

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tinystream-dev/tinystream のほかの issue

tinystream-dev/tinystream の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。