From 6e9bbc6525989f7dc51acc76712c6ca674053b60 Mon Sep 17 00:00:00 2001 From: Mohammad Alsaleh Date: Sat, 11 Aug 2012 01:50:25 +0300 Subject: [PATCH] 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: Mohammad Alsaleh Signed-off-by: Anton Khirnov --- libavformat/id3v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 650dd596a4..e12e930924 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -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; }