[SCM] libav/experimental: id3v2enc: use a case-insensitive comparison for APIC picture type

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:03:42 UTC 2014


The following commit has been merged in the experimental branch:
commit 9279826008b80daad7446950a821f32033ccd33f
Author: Anton Khirnov <anton at khirnov.net>
Date:   Wed Jul 2 22:41:47 2014 +0200

    id3v2enc: use a case-insensitive comparison for APIC picture type

diff --git a/libavformat/id3v2enc.c b/libavformat/id3v2enc.c
index df00f05..89181c2 100644
--- a/libavformat/id3v2enc.c
+++ b/libavformat/id3v2enc.c
@@ -21,6 +21,7 @@
 #include <stdint.h>
 #include <string.h>
 
+#include "libavutil/avstring.h"
 #include "libavutil/dict.h"
 #include "libavutil/intreadwrite.h"
 #include "avformat.h"
@@ -185,7 +186,7 @@ int ff_id3v2_write_apic(AVFormatContext *s, ID3v2EncContext *id3, AVPacket *pkt)
     /* get the picture type */
     e = av_dict_get(st->metadata, "comment", NULL, 0);
     for (i = 0; e && i < FF_ARRAY_ELEMS(ff_id3v2_picture_types); i++) {
-        if (strstr(ff_id3v2_picture_types[i], e->value) == ff_id3v2_picture_types[i]) {
+        if (!av_strcasecmp(e->value, ff_id3v2_picture_types[i])) {
             type = i;
             break;
         }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list