Skip to content

Commit

Permalink
Fix endless loop when reading an unsupported file from a stream [#263]
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeugma440 committed May 1, 2024
1 parent a8e4217 commit 7c73e60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ATL/AudioData/AudioFileIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ public AudioFileIO(Stream stream, string mimeType, bool readEmbeddedPictures, bo
bool found = false;
while (!found && alternate < AudioDataIOFactory.MAX_ALTERNATES)
{
audioData = mimeType.Length > 0 ? AudioDataIOFactory.GetInstance().GetFromMimeType(mimeType, "In-memory", alternate++) : AudioDataIOFactory.GetInstance().GetFromStream(stream);
audioData = mimeType.Length > 0 ? AudioDataIOFactory.GetInstance().GetFromMimeType(mimeType, "In-memory", alternate) : AudioDataIOFactory.GetInstance().GetFromStream(stream);
audioManager = new AudioDataManager(audioData, stream);
found = audioManager.ReadFromFile(readEmbeddedPictures, readAllMetaFrames);
alternate++;
}
Metadata = getAndCheckMetadata();
}
Expand Down

0 comments on commit 7c73e60

Please sign in to comment.