From: ffmpegagent <ffmpegagent@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: Miguel Borges de Freitas <92enen@gmail.com> Subject: [FFmpeg-devel] [PATCH 0/2] libavformat/matroskadec: set fixed duration for subtitles Date: Tue, 10 Jan 2023 15:42:06 +0000 Message-ID: <pull.48.ffstaging.FFmpeg.1673365328.ffmpegagent@gmail.com> (raw) 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 ---------------------------------------------------------------------------- This is my attempt at fixing https://trac.ffmpeg.org/ticket/10135 Initially reported to Kodi in https://github.com/xbmc/xbmc/issues/21625 Miguel Borges de Freitas (2): libavformat/matroskadec: set fixed duration for subtitles fate: update test reference data to include AV_PKT_FLAG_FIXED_DURATION libavcodec/packet.h | 5 ++ libavformat/demux.c | 3 +- libavformat/matroskadec.c | 4 + tests/ref/fate/matroska-dvbsub-remux | 84 ++++++++++---------- tests/ref/fate/matroska-zero-length-block | 4 +- tests/ref/fate/matroska-zlib-decompression | 2 +- tests/ref/fate/shortest-sub | 92 +++++++++++----------- 7 files changed, 102 insertions(+), 92 deletions(-) base-commit: 94aa70d757af6b0e0919250f9def2a819aa00358 Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-48%2Fenen92%2Fass_mkv_fixed_subs-v1 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-48/enen92/ass_mkv_fixed_subs-v1 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/48 -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2023-01-10 15:42 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-10 15:42 ffmpegagent [this message] 2023-01-10 15:42 ` [FFmpeg-devel] [PATCH 1/2] " Miguel Borges de Freitas 2023-01-10 15:42 ` [FFmpeg-devel] [PATCH 2/2] fate: update test reference data to include AV_PKT_FLAG_FIXED_DURATION Miguel Borges de Freitas 2023-01-22 18:21 ` [FFmpeg-devel] [PATCH 0/2] libavformat/matroskadec: set fixed duration for subtitles Miguel Borges de Freitas
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=pull.48.ffstaging.FFmpeg.1673365328.ffmpegagent@gmail.com \ --to=ffmpegagent@gmail.com \ --cc=92enen@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git