Files
mpv-joc/fork/files/audio/decode
TheM14 ea0532df88 Initialize native PCM decoders from mpv codec parameters
The PCM path only copied lav_codecpar or extradata into its decoder
context. mpv's native Matroska demuxer stores the sample rate, channel
layout and sample depth in mp_codec_params instead. PCM tracks in MKA
therefore reached avcodec_open2 with sample_rate=0 and failed before
binaural rendering or WAV output could start.

Use mp_set_avctx_codec_headers, as ad_lavc does, to initialize the PCM
decoder for both native and libavformat demuxers. Check the conversion
result and report initialization failures. Keep the renderer, EOF drain
and decoder routing unchanged.

Verified the failing 48 kHz, 6-channel, 24-bit PCM MKA now exports through
the native Matroska path to a stereo float32 binaural WAV with all
37125120 samples (773.44 seconds). WAV and full FLAC exports still reach
EOF with their exact sample counts. E-AC-3 JOC and ad-joc-pcm=no output
are bit-identical to the baseline in their regression cases.
2026-11-14 23:38:46 +08:00
..
2026-11-10 00:18:07 +08:00
2026-10-18 21:31:38 +08:00
2026-10-18 21:31:38 +08:00