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

Fix mp4 edts trace info #1442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

quink-black
Copy link

  1. Media time is signed value
  2. Media time is in unit of mdhd time scale. Since mdhd comes after
    edts, we don't know mdhd_TimeScale yet when handle edts. Give a hint
    to user on which time scale to use.

Fix #1441

@JeromeMartinez
Copy link
Member

Thanks for the PR.
For historical reason, modifications in Source/MediaInfo/File__Analyze.h must be replicated in Source/MediaInfo/File__Analyze_MinimizeSize.h.

1. Media time is signed value
2. Media time is in unit of mdhd time scale. Since mdhd comes after
edts, we don't know mdhd_TimeScale yet when handle edts. Give a hint
to user on which time scale to use.

Fix MediaArea#1441
Copy link
Member

@JeromeMartinez JeromeMartinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an impact on the value -1, which was previously forced to unsigned.

Search for .edts[0].Delay==(int32u)-1 and replace by .edts[0].Delay==-1. 3x in the code.

(generally speaking this part of the code is one of the most awful, and definitely need a complete refactoring as well as adding more boxes in the parsing... But classic excuse: lack of time :( ).

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.

mp4 edts media time info is incorrect
2 participants