1
0
Fork 0

vapoursynth: Fix offset in audio block's first frame

This commit is contained in:
arch1t3cht 2022-11-01 00:15:57 +01:00
parent a5aa4eca29
commit 962295cf1e
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ void VapoursynthAudioProvider::FillBufferWithFrame(void *buf, int n, int64_t sta
std::vector<const uint8_t *> 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");