-
Notifications
You must be signed in to change notification settings - Fork 3
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
libavformat/matroskadec: set fixed duration for subtitles #48
base: master
Are you sure you want to change the base?
Conversation
/approve |
b35adad
to
3752b85
Compare
There is an issue in commit 3752b85: |
30cd632
to
76ed24e
Compare
The matroska specification states the start time and duration of subtitle entries are encoded in the block TimeStamp and BlockDuration. Furthermore, for all subtitle formats except S_HDMV/PGS the BlockDuration must always be defined and have an absolute value even if it is simply 0. ffmpeg assumes that a duration of 0 means the duration is still unknown and tries to adjust based on the next packet pts. This is wrong for all formats except S_HDMV/PGS. Since changing the semantics of duration 0 is not an option (touches too many parts of the code) this change introduces AV_PKT_FLAG_FIXED_DURATION flag which decoders might use to flag the duration of a given packet should not be changed. Signed-off-by: Miguel Borges de Freitas <[email protected]>
76ed24e
to
5985bf7
Compare
Updates some of the test reference data to include the new AV_PKT_FLAG_FIXED_DURATION (this is the case for most matroska subtitles) Signed-off-by: Miguel Borges de Freitas <[email protected]>
/submit |
Error: User enen92 is not yet permitted to use the FFmpeg CodeBot |
/approve |
/allow |
User enen92 is now allowed to use the FFmpeg Code Bot. WARNING: enen92 has no public email address set on GitHub |
@tmm1 LOL, you got me confused myself for a minute - it's allow, not approve :-) |
/submit |
Submitted as [email protected] To fetch this version into
To fetch this version to local tag
|
On the FFmpeg mailing list, Miguel Borges de Freitas wrote (reply to this):
|
User |
The matroska specification states the start time and duration of
subtitle entries are encoded in the block TimeStamp
and BlockDuration. Furthermore, for all subtitle formats except
S_HDMV/PGS the BlockDuration must always be defined and have an absolute
value even if it is simply 0. ffmpeg assumes that a duration of 0 means
the duration is still unknown and tries to adjust based on the next packet
pts. This is wrong for all formats except S_HDMV/PGS.
Since changing the semantics of duration 0 is not an option (touches too
many parts of the code) this change introduces AV_PKT_FLAG_FIXED_DURATION flag which
decoders might use to flag the duration of a given packet should not be
changed.
Signed-off-by: Miguel Borges de Freitas [email protected]
This is my attempt at fixing https://trac.ffmpeg.org/ticket/10135
Initially reported to Kodi in xbmc/xbmc#21625
cc: Miguel Borges de Freitas [email protected]