Commit 92798260 authored by Anton Khirnov's avatar Anton Khirnov

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

parent 0955e57a
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include "libavutil/avstring.h"
#include "libavutil/dict.h" #include "libavutil/dict.h"
#include "libavutil/intreadwrite.h" #include "libavutil/intreadwrite.h"
#include "avformat.h" #include "avformat.h"
...@@ -185,7 +186,7 @@ int ff_id3v2_write_apic(AVFormatContext *s, ID3v2EncContext *id3, AVPacket *pkt) ...@@ -185,7 +186,7 @@ int ff_id3v2_write_apic(AVFormatContext *s, ID3v2EncContext *id3, AVPacket *pkt)
/* get the picture type */ /* get the picture type */
e = av_dict_get(st->metadata, "comment", NULL, 0); e = av_dict_get(st->metadata, "comment", NULL, 0);
for (i = 0; e && i < FF_ARRAY_ELEMS(ff_id3v2_picture_types); i++) { 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; type = i;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment