Bug Fix: Fix FFmpeg reporting timestamps for DSD
Some checks failed
Check if Cog buildable / Build Universal Cog.app (push) Has been cancelled

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 a19469325b
commit ac26a28f59

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;