[FFmpeg-devel] [PATCH 01/15] lavc/codec_desc: add MIME type to AV_CODEC_ID_TEXT

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Wed Sep 9 12:16:28 EEST 2020


rcombs:
> ---
>  libavcodec/codec_desc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
> index 9e73dcba27..3dee640360 100644
> --- a/libavcodec/codec_desc.c
> +++ b/libavcodec/codec_desc.c
> @@ -3173,6 +3173,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
>          .name      = "text",
>          .long_name = NULL_IF_CONFIG_SMALL("raw UTF-8 text"),
>          .props     = AV_CODEC_PROP_TEXT_SUB,
> +        .mime_types= MT("text/plain"),
>      },
>      {
>          .id        = AV_CODEC_ID_XSUB,
> 
I'm not sure this is ok. text/plain means any text, not necessarily
subtitles. Your change will make the Matroska demuxer use
AV_CODEC_ID_TEXT for text/plain (which is the reason why I kept this
special case in the muxer).

- Andreas


More information about the ffmpeg-devel mailing list