PR #23287 opened by Michael Kuron (mkuron) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23287 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23287.patch
There is not a lot of documentation on this, but my pull request matches what various other implementations do and it gives correct results for numerous DVDs. I don't know what the `lang_extension` field is for, but I observe that any disposition flags appear in the `code_extension` field. In fact, the implementation for subtitle tracks now matches what we do for audio tracks in line 1207-1210. >From c9816c38940dd31e37c2a583cbbbee9d07ff35d3 Mon Sep 17 00:00:00 2001 From: Michael Kuron <[email protected]> Date: Sun, 31 May 2026 13:00:52 +0200 Subject: [PATCH] dvdvideodec: respect forced and comment dispositions on subtitles Signed-off-by: Michael Kuron <[email protected]> --- libavformat/dvdvideodec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c index 1e397e3bf5..f186c02d85 100644 --- a/libavformat/dvdvideodec.c +++ b/libavformat/dvdvideodec.c @@ -1313,8 +1313,10 @@ static int dvdvideo_subp_stream_analyze(AVFormatContext *s, uint32_t offset, sub entry->startcode = 0x20 + (offset & 0x1F); - if (subp_attr.lang_extension == 9) + if (subp_attr.code_extension == 9) entry->disposition |= AV_DISPOSITION_FORCED; + if (subp_attr.code_extension >= 13 && subp_attr.code_extension <= 15) + entry->disposition |= AV_DISPOSITION_COMMENT; memcpy(&entry->clut, c->play_state.pgc->palette, FF_DVDCLUT_CLUT_SIZE); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
