From 96a79d3ff20a3b229343f332a1b2ef5c5fa0e8c5 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 13 Feb 2025 03:25:43 -0800 Subject: [PATCH] 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 --- 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 566f29e6e..457283d7e 100644 --- a/Plugins/FFMPEG/FFMPEGDecoder.m +++ b/Plugins/FFMPEG/FFMPEGDecoder.m @@ -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;