Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`Decoder::new` silently zeros data

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

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

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
rust

調査の方向性

Compare Decoder::new(BufReader<File>) with Decoder::try_from(File) in the decoder implementation and its tests, focusing on the Symphonia MP4/AAC path and the related issue #846. Start by reproducing the reported sample counts with the provided test file and feature flags; done means both construction paths produce nonzero audio samples for that input.

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

説明

Initial issue is from https://github.com/marin-m/SongRec/issues/263
Related issue: #846

Code to reproduce:

use std::fs::File;
use std::io::BufReader;

fn main() {
    let file = File::open("video.mp4").unwrap();
    let decoder = rodio::Decoder::new(BufReader::new(file)).unwrap();
    let mut count = 0u64;
    let mut nonzero = 0u64;
    for s in decoder {
        count += 1;
        if s != 0.0 { nonzero += 1; }
        if count > 16_000 * 30 { break; }
    }
    eprintln!("[BROKEN]  Decoder::new(BufReader): samples={count} nonzero={nonzero}");

    let decoder = rodio::Decoder::try_from(File::open("video.mp4").unwrap()).unwrap();
    let mut count = 0u64;
    let mut nonzero = 0u64;
    for s in decoder {
        count += 1;
        if s != 0.0 { nonzero += 1; }
        if count > 16_000 * 30 { break; }
    }
    eprintln!("[WORKING] Decoder::try_from:      samples={count} nonzero={nonzero}");
}
[package]
name = "rodio-test"
version = "0.1.0"
edition = "2024"

[dependencies]
rodio = { git = "https://github.com/RustAudio/rodio.git", default-features = false, features = [
    "symphonia-isomp4", "symphonia-aac",
] }

Output:

[BROKEN]  Decoder::new(BufReader): samples=2048 nonzero=0
[WORKING] Decoder::try_from:      samples=480001 nonzero=469761

Works only on git, on the latest release, that is, 0.22.2 the working code is broken (there was a commit that fixed it).

Test file:

https://github.com/user-attachments/assets/ccf223c9-b1e7-4feb-8ae9-7744ff9cd165

LLM yap (may be helpful, IDK):

report.md

主要言語
Rust
スター
2.5k
フォーク
338
平均マージ
1日 3時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

RustAudio/rodio のほかの issue

RustAudio/rodio の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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