Replace all strcasecmp/strncasecmp usages.

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: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
Reimar Döffinger
2011-11-02 20:17:25 +01:00
parent 475fb67d0b
commit 96949dafcc
18 changed files with 93 additions and 55 deletions

View File

@ -44,13 +44,13 @@
#include <linux/videodev2.h>
#endif
#include <time.h>
#include <strings.h>
#include "libavutil/imgutils.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "avdevice.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/avstring.h"
static const int desired_video_buffers = 256;
@ -470,7 +470,7 @@ static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap)
for (i = 0;; i++) {
standard.index = i;
ret = ioctl(s->fd, VIDIOC_ENUMSTD, &standard);
if (ret < 0 || !strcasecmp(standard.name, s->standard))
if (ret < 0 || !av_strcasecmp(standard.name, s->standard))
break;
}
if (ret < 0) {