aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammad Alsaleh <msal@tormail.org>2012-08-11 01:50:25 +0300
committerAnton Khirnov <anton@khirnov.net>2012-08-12 11:00:19 +0200
commit6e9bbc6525989f7dc51acc76712c6ca674053b60 (patch)
treed31c87726db77cfe97297c9f8855c161a656f4b4
parent575db88377f4ea264f1ecb1efd02cb09f181ff70 (diff)
downloadffmpeg-6e9bbc6525989f7dc51acc76712c6ca674053b60.tar.gz
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 <msal@tormail.org> Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavformat/id3v2.c2
1 files changed, 1 insertions, 1 deletions
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;
}