diff mbox series

[FFmpeg-devel,1/1] libavformat/id3v2.c: add more image mimetypes

Message ID 20241027093322.3260418-1-sen@hastings.org
State New
Headers show
Series [FFmpeg-devel,1/1] libavformat/id3v2.c: add more image mimetypes | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Sen Hastings Oct. 27, 2024, 9:33 a.m. UTC
ffmpeg only supports a small number of valid image mimetypes in id3v2
tags, this patch adds more newer image mimetypes.

images were installed using mid3v2

ex: mid3v2 -p mice.jxl::3:image/jxl waltz_jxl.mp3

media samples(audio/image): https://codeberg.org/sen-h/ffmpeg-id3v2-image-samples

Signed-off-by: Sen Hastings <sen@hastings.org>
---
 libavformat/id3v2.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 3507885706..098da53578 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -132,9 +132,16 @@  const char * const ff_id3v2_picture_types[21] = {
 
 const CodecMime ff_id3v2_mime_tags[] = {
     { "image/gif",  AV_CODEC_ID_GIF   },
+    { "image/jls",  AV_CODEC_ID_JPEGLS},
     { "image/jpeg", AV_CODEC_ID_MJPEG },
     { "image/jpg",  AV_CODEC_ID_MJPEG },
+    { "image/jp2",  AV_CODEC_ID_JPEG2000  },
+    { "image/jxl",  AV_CODEC_ID_JPEGXL},
+    { "image/j2c",  AV_CODEC_ID_JPEG2000  },
     { "image/png",  AV_CODEC_ID_PNG   },
+    { "image/svg+xml", AV_CODEC_ID_SVG},
+    { "image/webp", AV_CODEC_ID_WEBP  },
+    { "image/qoi",  AV_CODEC_ID_QOI   },
     { "image/tiff", AV_CODEC_ID_TIFF  },
     { "image/bmp",  AV_CODEC_ID_BMP   },
     { "JPG",        AV_CODEC_ID_MJPEG }, /* ID3v2.2  */