[FFmpeg-devel] [PATCH v2 02/11] avformat/demux: set AV_DISPOSITION_CAPTIONS_EIA608 when FF_CODEC_PROPERTY_CLOSED_CAPTIONS is present
Marth64
marth64 at proxyid.net
Thu Nov 28 03:15:05 EET 2024
Signed-off-by: Marth64 <marth64 at proxyid.net>
---
libavformat/demux.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/demux.c b/libavformat/demux.c
index cba1f2e4df..61a163b267 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -2976,6 +2976,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
st->sample_aspect_ratio = av_mul_q(sti->display_aspect_ratio,
hw_ratio);
}
+
+ if (!!(sti->avctx->properties & FF_CODEC_PROPERTY_CLOSED_CAPTIONS))
+ st->disposition |= AV_DISPOSITION_CAPTIONS_EIA608;
} else if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
if (!avctx->bits_per_coded_sample)
avctx->bits_per_coded_sample =
--
2.34.1
More information about the ffmpeg-devel
mailing list