[FFmpeg-devel] [PATCH] lavf/matroskadec: stop mapping text/plain attachments to AV_CODEC_ID_TEXT

Soft Works softworkz at hotmail.com
Wed Jun 8 06:19:01 EEST 2022



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Anton
> Khirnov
> Sent: Tuesday, June 7, 2022 1:59 PM
> To: ffmpeg-devel at ffmpeg.org
> Subject: [FFmpeg-devel] [PATCH] lavf/matroskadec: stop mapping text/plain
> attachments to AV_CODEC_ID_TEXT
> 
> There is no reason to think that an attachment will contain text
> subtitles. In addition attachments are exported in extradata, so the
> AV_CODEC_ID_TEXT decoder would not do anything useful with it anyway.
> ---
>  libavformat/matroskadec.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index de73f97aca..cd30b5f7a4 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -806,7 +806,6 @@ static const CodecMime mkv_image_mime_tags[] = {
>  };
> 
>  static const CodecMime mkv_mime_tags[] = {
> -    {"text/plain"                 , AV_CODEC_ID_TEXT},
>      {"application/x-truetype-font", AV_CODEC_ID_TTF},
>      {"application/x-font"         , AV_CODEC_ID_TTF},
>      {"application/vnd.ms-opentype", AV_CODEC_ID_OTF},
> --

 
Thank you for trying to find a solution for the ffprobe error.

With this patch, text attachments are no longer shown as "text"
but as "none" and ffprobe outputs a warning:

  Stream #0:9: Attachment: none
    Metadata:
      filename        : .....
      mimetype        : text/plain
Unsupported codec with id 0 for input stream 9


Regards,
sw



More information about the ffmpeg-devel mailing list