X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fid3v2.c;h=f9b5b0354f529cc1c994f75ceed3358c4d9faaed;hb=a9a1bc56abf1fa79104996bf7b98b12ca42cd32c;hp=216d4a2e5729c871df5c3041e21dca67aea10789;hpb=5c14b282d1cc407f6b9efb03564ecac75fb59471;p=ffmpeg diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 216d4a2e572..f9b5b0354f5 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -125,12 +125,15 @@ const char *ff_id3v2_picture_types[21] = { }; const CodecMime ff_id3v2_mime_tags[] = { - {"image/gif" , CODEC_ID_GIF}, - {"image/jpeg", CODEC_ID_MJPEG}, - {"image/jpg", CODEC_ID_MJPEG}, - {"image/png" , CODEC_ID_PNG}, - {"image/tiff", CODEC_ID_TIFF}, - {"", CODEC_ID_NONE}, + {"image/gif" , AV_CODEC_ID_GIF}, + {"image/jpeg", AV_CODEC_ID_MJPEG}, + {"image/jpg", AV_CODEC_ID_MJPEG}, + {"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}, }; int ff_id3v2_match(const uint8_t *buf, const char * magic) @@ -440,7 +443,7 @@ static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, char *tag int enc, pic_type; char mimetype[64]; const CodecMime *mime = ff_id3v2_mime_tags; - enum CodecID id = CODEC_ID_NONE; + enum AVCodecID id = AV_CODEC_ID_NONE; ID3v2ExtraMetaAPIC *apic = NULL; ID3v2ExtraMeta *new_extra = NULL; int64_t end = avio_tell(pb) + taglen; @@ -458,14 +461,14 @@ 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 != CODEC_ID_NONE) { - if (!strncmp(mime->str, mimetype, sizeof(mimetype))) { + while (mime->id != AV_CODEC_ID_NONE) { + if (!av_strncasecmp(mime->str, mimetype, sizeof(mimetype))) { id = mime->id; break; } mime++; } - if (id == CODEC_ID_NONE) { + if (id == AV_CODEC_ID_NONE) { av_log(s, AV_LOG_WARNING, "Unknown attached picture mimetype: %s, skipping.\n", mimetype); goto fail; }