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

add support for zero-length boxes #29

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

add support for zero-length boxes #29

wants to merge 10 commits into from

Conversation

chemag
Copy link
Contributor

@chemag chemag commented Nov 26, 2024

In order to end a list of sub-boxes, some ISOBMFF multiplexers prefer to end a box list with a length=0 entry, instead of a non-existent length field. Patch adds support for this behavior.

In order to end a list of sub-boxes, some ISOBMFF multiplexers prefer to
end a box list with a length=0 entry, instead of a non-existent length
field. Patch adds support for this behavior.
@chemag
Copy link
Contributor Author

chemag commented Dec 3, 2024

ping

@chemag
Copy link
Contributor Author

chemag commented Dec 5, 2024

added CTSS parser

@chemag
Copy link
Contributor Author

chemag commented Dec 10, 2024

did you manage to take a look at these 2 patches?

Only adding 32-bit BE, as it is the one needed for now.
Standard defines offsets (sample_offset) to be unsigned or signed
int depending on the version field. More concretely,
ISO/IEC 14496-12:2022 modifies the behavior of CTTS so that
makes sample_offset is a 32-bit signed int when version is 1.

Section 8.6.1.3.2:
```
aligned(8) class CompositionOffsetBox
  extends FullBox('ctts', version, 0) {
  unsigned int(32) entry_count;
  int i;
  if (version==0) {
    for (i=0; i < entry_count; i++) {
      unsigned int(32) sample_count;
      unsigned int(32) sample_offset;
    }
  }
  else if (version == 1) {
    for (i=0; i < entry_count; i++) {
      unsigned int(32) sample_count;
      signed int(32) sample_offset;
    }
  }
}
```

Apple MOV muxers are known to use negative CTTS offsets even
without setting the version field to 1. It typically makes no
sense to have a sensor offset larger than 0x7fff,ffff, so we
will force signed int always.
@hwknsj
Copy link

hwknsj commented Dec 19, 2024

yo the homie @chemag is trying to help y'all

@DDNA-BuildAgent help them out, robot

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