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 <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-03-28 20:26:27 -07:00
parent e9b15bc269
commit a9ce4f4eff

View file

@ -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;