Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 0/2] libavformat/matroskadec: set fixed duration for subtitles
@ 2023-01-10 15:42 ffmpegagent
  2023-01-10 15:42 ` [FFmpeg-devel] [PATCH 1/2] " Miguel Borges de Freitas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ffmpegagent @ 2023-01-10 15:42 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Miguel Borges de Freitas

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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-22 18:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 15:42 [FFmpeg-devel] [PATCH 0/2] libavformat/matroskadec: set fixed duration for subtitles ffmpegagent
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

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