Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The AudioFileIO reads HEIC file endlessly #263

Closed
atamanuk opened this issue Apr 22, 2024 · 6 comments
Closed

The AudioFileIO reads HEIC file endlessly #263

atamanuk opened this issue Apr 22, 2024 · 6 comments
Assignees

Comments

@atamanuk
Copy link

The problem

The AudioFileIO reads HEIC file endlessly

Environment

  • ATL version: 5.22
  • OS/version: MacOS 13.4.1

Details

When I'm creating the Track from HEIC file without mimeType, the constructor of AudioFileIO goes into an endless loop and incessantly writes to log:

  {ATL.Logging.Log.LogItem}
    Level: 1
    Location: "in-memory"
    Message: "moov atom could not be found; aborting read"
    When: {22.04.2024 18:43:30}

Code To Reproduce Issue

  var b = File.ReadAllBytes("./2020-08-25 23-23-33.HEIC");
  using var s = new MemoryStream(b);
  var t = new Track(s);
@Zeugma440
Copy link
Owner

Thanks for your feedback~

These kind of issues are often specific to a quirk inside the file you're using. Would it be possible to upload it somewhere (e.g. mega, WeTransfer...)?

Thanks in advance

@Zeugma440
Copy link
Owner

Plus I just realized HEIC is a picture format. This library is an audio library. Are you sure you're using it correctly?

@atamanuk
Copy link
Author

I use the library to find out the type of audio. But sometimes incorrect files are sent to the input. It would be nice if the library would return error or throw exception in this case.

2020-08-25 23-23-33.HEIC.zip

@Numpsy
Copy link
Contributor

Numpsy commented Apr 28, 2024

fwiw, looks like it gets stuck at

while (!found && alternate < AudioDataIOFactory.MAX_ALTERNATES)
, because found is always false and alternate doesn't get incremented (the variant of AudioFileIO() that takes a path does exit for comparison)

@Zeugma440
Copy link
Owner

Well done @Numpsy, you saved me quite some debugging time 😄

The fix will be available on next release ✅

@Zeugma440
Copy link
Owner

Fix is available on today's v5.23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants