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

libavformat/matroskadec: set fixed duration for subtitles #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jan 10, 2023

  1. libavformat/matroskadec: set fixed duration for subtitles

    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 <enen92@kodi.tv>
    enen92 committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    5985bf7 View commit details
    Browse the repository at this point in the history
  2. fate: update test reference data to include AV_PKT_FLAG_FIXED_DURATION

    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 <enen92@kodi.tv>
    enen92 committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    21e0647 View commit details
    Browse the repository at this point in the history