From ac26a28f59fef618eabcb1c27554410964e83e32 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 28 Mar 2025 20:26:27 -0700 Subject: [PATCH] Bug Fix: Fix FFmpeg reporting timestamps for DSD Raw DSD is counting frames in bytes, not bits/samples, so it needs to be scaled up when dividing by the raw sample rate. Signed-off-by: Christopher Snowhill --- Plugins/FFMPEG/FFMPEGDecoder.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/FFMPEG/FFMPEGDecoder.m b/Plugins/FFMPEG/FFMPEGDecoder.m index 3d86ac46d..7eb3f7dd3 100644 --- a/Plugins/FFMPEG/FFMPEGDecoder.m +++ b/Plugins/FFMPEG/FFMPEGDecoder.m @@ -991,7 +991,7 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va if(totalFrames && (framesRead + framesReadNow > totalFrames)) framesReadNow = (int)(totalFrames - framesRead); - double streamTimestamp = (double)(framesRead) / frequency; + double streamTimestamp = (double)(framesRead * (rawDSD ? 8UL : 1UL)) / frequency; framesRead += framesReadNow;