Skip to content

Add moov mdat stream check #492

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add moov mdat stream check #492

wants to merge 4 commits into from

Conversation

okyanusoz
Copy link

@okyanusoz okyanusoz commented Jul 13, 2025

Description

I added a check for the mdat stream not to be null and warn the user about it because it can sometimes cause exceptions, like below:
Screenshot 2025-07-14 at 01 38 23

@DenizUgur
Copy link
Member

This would make avcC writing in mixed endianness. You should specify endianness on DataStream (in your application).

For the mdat issue. That probably happens when you're not using createFile(true) which would instruct the library to discard the mdat (when it's set to false). If you could revise the PR to check for that and warn if we should be expecting data in mdat but it's not there, that would be better.

@okyanusoz
Copy link
Author

okyanusoz commented Jul 14, 2025

You're right about the moov and avCC part. I'll amend the PR for that.

For reference, the reason why avcC was failing was because I used DataStream.BIG_ENDIAN, which doesn't exist in the latest version. I modified my code to use Endianness.BIG_ENDIAN and it worked.

@okyanusoz okyanusoz changed the title Fix AVCC write() endianness Add moov mdat stream check Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants