diff mbox series

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

Message ID 20200909060217.25794-1-rcombs@rcombs.me
State New
Headers show
Series [FFmpeg-devel,01/15] lavc/codec_desc: add MIME type to AV_CODEC_ID_TEXT | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

rcombs Sept. 9, 2020, 6:02 a.m. UTC
---
 libavcodec/codec_desc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Paul B Mahol Sept. 9, 2020, 8:58 a.m. UTC | #1
On Wed, Sep 09, 2020 at 01:02:03AM -0500, rcombs wrote:
> ---
>  libavcodec/codec_desc.c | 1 +
>  1 file changed, 1 insertion(+)
> 

lgtm
Andreas Rheinhardt Sept. 9, 2020, 9:16 a.m. UTC | #2
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
diff mbox series

Patch

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,