[FFmpeg-cvslog] id3v2: Match PIC mimetype/format case-insensitively
Mohammad Alsaleh
git at videolan.org
Sun Aug 12 13:48:49 CEST 2012
ffmpeg | branch: master | Mohammad Alsaleh <msal at tormail.org> | Sat Aug 11 01:50:25 2012 +0300| [6e9bbc6525989f7dc51acc76712c6ca674053b60] | committer: 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: Mohammad Alsaleh <msal at tormail.org>
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e9bbc6525989f7dc51acc76712c6ca674053b60
---
libavformat/id3v2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 650dd59..e12e930 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;
}
More information about the ffmpeg-cvslog
mailing list