Replace all usage of strcasecmp/strncasecmp
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
committed by
Martin Storsjö
parent
ba04ecfdac
commit
bb3244dee2
@@ -19,7 +19,6 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <strings.h>
|
||||
#include "avformat.h"
|
||||
#include "avio_internal.h"
|
||||
#include "id3v1.h"
|
||||
@@ -64,7 +63,7 @@ static int id3v1_create_tag(AVFormatContext *s, uint8_t *buf)
|
||||
buf[127] = 0xFF; /* default to unknown genre */
|
||||
if ((tag = av_dict_get(s->metadata, "TCON", NULL, 0))) { //genre
|
||||
for(i = 0; i <= ID3v1_GENRE_MAX; i++) {
|
||||
if (!strcasecmp(tag->value, ff_id3v1_genre_str[i])) {
|
||||
if (!av_strcasecmp(tag->value, ff_id3v1_genre_str[i])) {
|
||||
buf[127] = i;
|
||||
count++;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user