Open
Conversation
This expose `AVFormatContext::start_time` to user.
This was referenced Feb 14, 2026
dwbuiten
requested changes
Apr 5, 2026
| return Indexer->GetTrackCodec(Track); | ||
| } | ||
|
|
||
| FFMS_API(bool) FFMS_GetContainerFirstTimeI(FFMS_Indexer *Indexer, int64_t *pts, int *timebase) { |
Member
There was a problem hiding this comment.
Few notes:
- I would avoid using
boolhere - is this a C99 bool or C++ bool? This is in a C++ file after all. - Just return an
intor-1. Returning the timebase is redundant and confusing, as it is already available via other functions, and this would add a second place it is returned.
Contributor
Author
There was a problem hiding this comment.
- I would avoid using
boolhere - is this a C99 bool or C++ bool? This is in a C++ file after all.
Good catch, it's a cpp bool.
I guess I should change the return to a int.
- Just return an
intor-1. Returning the timebase is redundant and confusing, as it is already available via other functions, and this would add a second place it is returned.
The problem is that the container timebase isn't the same as the stream one!
moi15moi
added a commit
to moi15moi/ffms2
that referenced
this pull request
Apr 6, 2026
The goal is to catch issue like this one: FFMS#472 (comment)
moi15moi
added a commit
to moi15moi/ffms2
that referenced
this pull request
Apr 6, 2026
The goal is to catch issue like this one: FFMS#472 (comment)
moi15moi
added a commit
to moi15moi/ffms2
that referenced
this pull request
Apr 6, 2026
The goal is to catch issue like this one: FFMS#472 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR expose
AVFormatContext::start_timeto users.This is usefull for tool like aegisub which want to emulate how mpv set the timestamps.
It allow to fix arch1t3cht/Aegisub#172
@arch1t3cht