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:
Reimar Döffinger
2011-11-02 20:17:25 +01:00
committed by Martin Storsjö
parent ba04ecfdac
commit bb3244dee2
14 changed files with 123 additions and 132 deletions

View File

@ -42,12 +42,12 @@
#include <linux/videodev2.h>
#endif
#include <time.h>
#include <strings.h>
#include "libavutil/imgutils.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/avstring.h"
static const int desired_video_buffers = 256;
@ -493,7 +493,7 @@ static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap)
return AVERROR(EIO);
}
if (!strcasecmp(standard.name, s->standard)) {
if (!av_strcasecmp(standard.name, s->standard)) {
break;
}
}