[FFmpeg-devel] [PATCH v2 3/4] lavc/codec_desc.c: remove AV_CODEC_PROP_TEXT_SUB property
TADANO Tokumei
aimingoff at pc.nifty.jp
Sat May 21 19:09:43 EEST 2022
To support bitmap type of subtitles, remove AV_CODEC_PROP_TEXT_SUB
property from codec descriptor for AV_CODEC_ID_ARIB_CAPTION.
It is similar way to `libavcodec/libzvbi-teletextdec.c`
(AV_CODEC_ID_DVB_TELETEXT).
Instead, each subtitle decoder has to specify subtitile format.
`libavcodec/libaribb24.c` uses same AV_CODEC_ID_ARIB_CAPTION and
expects AV_CODEC_PROP_TEXT_SUB is defined. Thus add a line to
specify text format subtitle.
Signed-off-by: TADANO Tokumei <aimingoff at pc.nifty.jp>
---
libavcodec/codec_desc.c | 1 -
libavcodec/libaribb24.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index e7f0f6a8d4..d0a31b536b 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -3441,7 +3441,6 @@ static const AVCodecDescriptor codec_descriptors[] = {
.type = AVMEDIA_TYPE_SUBTITLE,
.name = "arib_caption",
.long_name = NULL_IF_CONFIG_SMALL("ARIB STD-B24 caption"),
- .props = AV_CODEC_PROP_TEXT_SUB,
.profiles = NULL_IF_CONFIG_SMALL(ff_arib_caption_profiles),
},
diff --git a/libavcodec/libaribb24.c b/libavcodec/libaribb24.c
index 9658e1d5ac..46c25053b2 100644
--- a/libavcodec/libaribb24.c
+++ b/libavcodec/libaribb24.c
@@ -274,6 +274,7 @@ next_region:
av_log(avctx, AV_LOG_DEBUG, "Styled ASS line: %s\n",
buf.str);
+ sub->format = 1; /* text */
ret = ff_ass_add_rect(sub, buf.str, b24->read_order++,
0, NULL, NULL);
}
--
2.30.2
More information about the ffmpeg-devel
mailing list