提交 6e9bbc65 编写于 作者: M Mohammad Alsaleh 提交者: Anton Khirnov

id3v2: Match PIC mimetype/format case-insensitively

Some files' embedded art seems to have the mimetype 'image/JPG' instead
of 'image/jpg'. Libav fails to parse those because it matches
case-sensitively.

Use av_strncasecmp() to fix this behaviour.
Signed-off-by: NMohammad Alsaleh <msal@tormail.org>
Signed-off-by: NAnton Khirnov <anton@khirnov.net>
上级 575db883
......@@ -450,7 +450,7 @@ static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, char *tag
/* mimetype */
taglen -= avio_get_str(pb, taglen, mimetype, sizeof(mimetype));
while (mime->id != AV_CODEC_ID_NONE) {
if (!strncmp(mime->str, mimetype, sizeof(mimetype))) {
if (!av_strncasecmp(mime->str, mimetype, sizeof(mimetype))) {
id = mime->id;
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册