]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/id3v2.c
Merge commit 'b146d74730ab9ec5abede9066f770ad851e45fbc'
[ffmpeg] / libavformat / id3v2.c
index 97de41efad927bbc5c0f8920cfb9f71d9a435e59..9c202877786d63830bebe049436a3eae86b7b944 100644 (file)
@@ -131,6 +131,8 @@ const CodecMime ff_id3v2_mime_tags[] = {
     {"image/png" , AV_CODEC_ID_PNG},
     {"image/tiff", AV_CODEC_ID_TIFF},
     {"image/bmp",  AV_CODEC_ID_BMP},
+    {"JPG",        AV_CODEC_ID_MJPEG}, /* ID3v2.2  */
+    {"PNG" ,       AV_CODEC_ID_PNG},   /* ID3v2.2  */
     {"",           AV_CODEC_ID_NONE},
 };
 
@@ -460,7 +462,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;
         }
@@ -712,7 +714,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
         }
         else if (!tag[0]) {
             if (tag[1])
-                av_log(s, AV_LOG_WARNING, "invalid frame id, assuming padding");
+                av_log(s, AV_LOG_WARNING, "invalid frame id, assuming padding\n");
             avio_skip(s->pb, tlen);
             break;
         }