FFmpeg Input: Fix stream timestamps

Stream timestamps were correctly being converted from the monotonically
increasing frame count, but the AudioChunk parameter was being set from
the frame count rather than the converted seconds count.

Fixes #418

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-02-13 03:25:43 -08:00
parent 061eefee29
commit 96a79d3ff2

View file

@ -933,7 +933,7 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va
id audioChunkClass = NSClassFromString(@"AudioChunk");
AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]];
[chunk setStreamTimestamp:framesRead];
[chunk setStreamTimestamp:streamTimestamp];
[chunk assignSamples:sampleBuffer frameCount:framesReadNow];
return chunk;