Skip to content

Commit

Permalink
Error out if getting packed audio fails as well
Browse files Browse the repository at this point in the history
  • Loading branch information
myrsloik committed Jul 29, 2024
1 parent cf1fa44 commit 78ca70b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/audiosource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,8 @@ void BestAudioSource::GetPackedAudio(uint8_t *Data, int64_t Start, int64_t Count

for (int64_t i = Range.First; i <= Range.Last; i++) {
std::unique_ptr<BestAudioFrame> F(GetFrame(i));
if (!F)
throw BestSourceException("Audio decoding error, failed to get frame " + std::to_string(i));
FillInFramePacked(F.get(), Range.FirstSamplePos, Data, Start, Count);
Range.FirstSamplePos += F->NumSamples;
}
Expand Down

0 comments on commit 78ca70b

Please sign in to comment.