This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 2bdbf5c67e86fd482c2979e5df17154a68a81392 Author: Kacper Michajłow <[email protected]> AuthorDate: Tue Jul 28 01:41:36 2026 +0200 Commit: Kacper Michajłow <[email protected]> CommitDate: Sun Sep 6 00:48:24 2026 +0200 avcodec/dstdec: fix decoding of uncompressed frames The DSD payload of an uncompressed frame was copied packed into the output buffer, but the in-place DSD to PCM conversion expects the DSD bytes in every 4th byte, in the place of the float sample they produce. This was always broken, but I guess, the uncompressed DST is something that exists only on paper. Signed-off-by: Kacper Michajłow <[email protected]> --- libavcodec/dstdec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c index d747670141..1db742d193 100644 --- a/libavcodec/dstdec.c +++ b/libavcodec/dstdec.c @@ -268,10 +268,17 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; if (!get_bits1(gb)) { + unsigned total = frame->nb_samples * channels; + unsigned n = FFMIN(avpkt->size - 1, total); skip_bits1(gb); if (get_bits(gb, 6)) return AVERROR_INVALIDDATA; - memcpy(frame->data[0], avpkt->data + 1, FFMIN(avpkt->size - 1, frame->nb_samples * channels)); + // DSD bytes are stored in every 4th byte, as expected by the + // in-place DSD to PCM conversion. Pad short frames with silence. + for (i = 0; i < n; i++) + dsd[i * 4] = avpkt->data[1 + i]; + for (; i < total; i++) + dsd[i * 4] = 0x69; goto dsd; } -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
