From 962295cf1e4f7327cb7b843abdcee5c3a8fadabe Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Tue, 1 Nov 2022 00:15:57 +0100 Subject: [PATCH] vapoursynth: Fix offset in audio block's first frame --- src/audio_provider_vs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio_provider_vs.cpp b/src/audio_provider_vs.cpp index 37005d3c1..b41b46773 100644 --- a/src/audio_provider_vs.cpp +++ b/src/audio_provider_vs.cpp @@ -117,7 +117,7 @@ void VapoursynthAudioProvider::FillBufferWithFrame(void *buf, int n, int64_t sta std::vector planes(channels); for (int c = 0; c < channels; c++) { - planes[c] = vs.GetAPI()->getReadPtr(frame, c); + planes[c] = vs.GetAPI()->getReadPtr(frame, c) + bytes_per_sample * start; if (planes[c] == nullptr) { vs.GetAPI()->freeFrame(frame); throw VapoursynthError("Failed to read audio channel");