Browse code

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>

Reimar Döffinger authored on 2011/11/03 04:17:25
Showing 14 changed files
... ...
@@ -24,7 +24,6 @@
24 24
 #define closesocket close
25 25
 #endif
26 26
 #include <string.h>
27
-#include <strings.h>
28 27
 #include <stdlib.h>
29 28
 #include "libavformat/avformat.h"
30 29
 #include "libavformat/ffm.h"
... ...
@@ -1085,13 +1084,13 @@ static int extract_rates(char *rates, int ratelen, const char *request)
1085 1085
     const char *p;
1086 1086
 
1087 1087
     for (p = request; *p && *p != '\r' && *p != '\n'; ) {
1088
-        if (strncasecmp(p, "Pragma:", 7) == 0) {
1088
+        if (av_strncasecmp(p, "Pragma:", 7) == 0) {
1089 1089
             const char *q = p + 7;
1090 1090
 
1091 1091
             while (*q && *q != '\n' && isspace(*q))
1092 1092
                 q++;
1093 1093
 
1094
-            if (strncasecmp(q, "stream-switch-entry=", 20) == 0) {
1094
+            if (av_strncasecmp(q, "stream-switch-entry=", 20) == 0) {
1095 1095
                 int stream_no;
1096 1096
                 int rate_no;
1097 1097
 
... ...
@@ -1271,9 +1270,9 @@ static void parse_acl_row(FFStream *stream, FFStream* feed, IPAddressACL *ext_ac
1271 1271
     int errors = 0;
1272 1272
 
1273 1273
     get_arg(arg, sizeof(arg), &p);
1274
-    if (strcasecmp(arg, "allow") == 0)
1274
+    if (av_strcasecmp(arg, "allow") == 0)
1275 1275
         acl.action = IP_ALLOW;
1276
-    else if (strcasecmp(arg, "deny") == 0)
1276
+    else if (av_strcasecmp(arg, "deny") == 0)
1277 1277
         acl.action = IP_DENY;
1278 1278
     else {
1279 1279
         fprintf(stderr, "%s:%d: ACL action '%s' is not ALLOW or DENY\n",
... ...
@@ -1358,7 +1357,7 @@ static IPAddressACL* parse_dynamic_acl(FFStream *stream, HTTPContext *c)
1358 1358
             continue;
1359 1359
         get_arg(cmd, sizeof(cmd), &p);
1360 1360
 
1361
-        if (!strcasecmp(cmd, "ACL"))
1361
+        if (!av_strcasecmp(cmd, "ACL"))
1362 1362
             parse_acl_row(NULL, NULL, acl, p, stream->dynamic_acl, line_num);
1363 1363
     }
1364 1364
     fclose(f);
... ...
@@ -1500,7 +1499,7 @@ static int http_parse_request(HTTPContext *c)
1500 1500
     av_strlcpy(filename, url + ((*url == '/') ? 1 : 0), sizeof(filename)-1);
1501 1501
 
1502 1502
     for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
1503
-        if (strncasecmp(p, "User-Agent:", 11) == 0) {
1503
+        if (av_strncasecmp(p, "User-Agent:", 11) == 0) {
1504 1504
             useragent = p + 11;
1505 1505
             if (*useragent && *useragent != '\n' && isspace(*useragent))
1506 1506
                 useragent++;
... ...
@@ -1518,7 +1517,7 @@ static int http_parse_request(HTTPContext *c)
1518 1518
         redir_type = REDIR_ASX;
1519 1519
         filename[strlen(filename)-1] = 'f';
1520 1520
     } else if (av_match_ext(filename, "asf") &&
1521
-        (!useragent || strncasecmp(useragent, "NSPlayer", 8) != 0)) {
1521
+        (!useragent || av_strncasecmp(useragent, "NSPlayer", 8) != 0)) {
1522 1522
         /* if this isn't WMP or lookalike, return the redirector file */
1523 1523
         redir_type = REDIR_ASF;
1524 1524
     } else if (av_match_ext(filename, "rpm,ram")) {
... ...
@@ -1613,7 +1612,7 @@ static int http_parse_request(HTTPContext *c)
1613 1613
         char *hostinfo = 0;
1614 1614
 
1615 1615
         for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
1616
-            if (strncasecmp(p, "Host:", 5) == 0) {
1616
+            if (av_strncasecmp(p, "Host:", 5) == 0) {
1617 1617
                 hostinfo = p + 5;
1618 1618
                 break;
1619 1619
             }
... ...
@@ -1742,11 +1741,11 @@ static int http_parse_request(HTTPContext *c)
1742 1742
             int client_id = 0;
1743 1743
 
1744 1744
             for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
1745
-                if (strncasecmp(p, "Pragma: log-line=", 17) == 0) {
1745
+                if (av_strncasecmp(p, "Pragma: log-line=", 17) == 0) {
1746 1746
                     logline = p;
1747 1747
                     break;
1748 1748
                 }
1749
-                if (strncasecmp(p, "Pragma: client-id=", 18) == 0)
1749
+                if (av_strncasecmp(p, "Pragma: client-id=", 18) == 0)
1750 1750
                     client_id = strtol(p + 18, 0, 10);
1751 1751
                 p = strchr(p, '\n');
1752 1752
                 if (!p)
... ...
@@ -4059,40 +4058,40 @@ static int parse_ffconfig(const char *filename)
4059 4059
 
4060 4060
         get_arg(cmd, sizeof(cmd), &p);
4061 4061
 
4062
-        if (!strcasecmp(cmd, "Port")) {
4062
+        if (!av_strcasecmp(cmd, "Port")) {
4063 4063
             get_arg(arg, sizeof(arg), &p);
4064 4064
             val = atoi(arg);
4065 4065
             if (val < 1 || val > 65536) {
4066 4066
                 ERROR("Invalid_port: %s\n", arg);
4067 4067
             }
4068 4068
             my_http_addr.sin_port = htons(val);
4069
-        } else if (!strcasecmp(cmd, "BindAddress")) {
4069
+        } else if (!av_strcasecmp(cmd, "BindAddress")) {
4070 4070
             get_arg(arg, sizeof(arg), &p);
4071 4071
             if (resolve_host(&my_http_addr.sin_addr, arg) != 0) {
4072 4072
                 ERROR("%s:%d: Invalid host/IP address: %s\n", arg);
4073 4073
             }
4074
-        } else if (!strcasecmp(cmd, "NoDaemon")) {
4074
+        } else if (!av_strcasecmp(cmd, "NoDaemon")) {
4075 4075
             avserver_daemon = 0;
4076
-        } else if (!strcasecmp(cmd, "RTSPPort")) {
4076
+        } else if (!av_strcasecmp(cmd, "RTSPPort")) {
4077 4077
             get_arg(arg, sizeof(arg), &p);
4078 4078
             val = atoi(arg);
4079 4079
             if (val < 1 || val > 65536) {
4080 4080
                 ERROR("%s:%d: Invalid port: %s\n", arg);
4081 4081
             }
4082 4082
             my_rtsp_addr.sin_port = htons(atoi(arg));
4083
-        } else if (!strcasecmp(cmd, "RTSPBindAddress")) {
4083
+        } else if (!av_strcasecmp(cmd, "RTSPBindAddress")) {
4084 4084
             get_arg(arg, sizeof(arg), &p);
4085 4085
             if (resolve_host(&my_rtsp_addr.sin_addr, arg) != 0) {
4086 4086
                 ERROR("Invalid host/IP address: %s\n", arg);
4087 4087
             }
4088
-        } else if (!strcasecmp(cmd, "MaxHTTPConnections")) {
4088
+        } else if (!av_strcasecmp(cmd, "MaxHTTPConnections")) {
4089 4089
             get_arg(arg, sizeof(arg), &p);
4090 4090
             val = atoi(arg);
4091 4091
             if (val < 1 || val > 65536) {
4092 4092
                 ERROR("Invalid MaxHTTPConnections: %s\n", arg);
4093 4093
             }
4094 4094
             nb_max_http_connections = val;
4095
-        } else if (!strcasecmp(cmd, "MaxClients")) {
4095
+        } else if (!av_strcasecmp(cmd, "MaxClients")) {
4096 4096
             get_arg(arg, sizeof(arg), &p);
4097 4097
             val = atoi(arg);
4098 4098
             if (val < 1 || val > nb_max_http_connections) {
... ...
@@ -4100,7 +4099,7 @@ static int parse_ffconfig(const char *filename)
4100 4100
             } else {
4101 4101
                 nb_max_connections = val;
4102 4102
             }
4103
-        } else if (!strcasecmp(cmd, "MaxBandwidth")) {
4103
+        } else if (!av_strcasecmp(cmd, "MaxBandwidth")) {
4104 4104
             int64_t llval;
4105 4105
             get_arg(arg, sizeof(arg), &p);
4106 4106
             llval = atoll(arg);
... ...
@@ -4108,10 +4107,10 @@ static int parse_ffconfig(const char *filename)
4108 4108
                 ERROR("Invalid MaxBandwidth: %s\n", arg);
4109 4109
             } else
4110 4110
                 max_bandwidth = llval;
4111
-        } else if (!strcasecmp(cmd, "CustomLog")) {
4111
+        } else if (!av_strcasecmp(cmd, "CustomLog")) {
4112 4112
             if (!avserver_debug)
4113 4113
                 get_arg(logfilename, sizeof(logfilename), &p);
4114
-        } else if (!strcasecmp(cmd, "<Feed")) {
4114
+        } else if (!av_strcasecmp(cmd, "<Feed")) {
4115 4115
             /*********************************************/
4116 4116
             /* Feed related options */
4117 4117
             char *q;
... ...
@@ -4145,7 +4144,7 @@ static int parse_ffconfig(const char *filename)
4145 4145
                 *last_feed = feed;
4146 4146
                 last_feed = &feed->next_feed;
4147 4147
             }
4148
-        } else if (!strcasecmp(cmd, "Launch")) {
4148
+        } else if (!av_strcasecmp(cmd, "Launch")) {
4149 4149
             if (feed) {
4150 4150
                 int i;
4151 4151
 
... ...
@@ -4167,24 +4166,24 @@ static int parse_ffconfig(const char *filename)
4167 4167
                     inet_ntoa(my_http_addr.sin_addr),
4168 4168
                     ntohs(my_http_addr.sin_port), feed->filename);
4169 4169
             }
4170
-        } else if (!strcasecmp(cmd, "ReadOnlyFile")) {
4170
+        } else if (!av_strcasecmp(cmd, "ReadOnlyFile")) {
4171 4171
             if (feed) {
4172 4172
                 get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p);
4173 4173
                 feed->readonly = 1;
4174 4174
             } else if (stream) {
4175 4175
                 get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
4176 4176
             }
4177
-        } else if (!strcasecmp(cmd, "File")) {
4177
+        } else if (!av_strcasecmp(cmd, "File")) {
4178 4178
             if (feed) {
4179 4179
                 get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p);
4180 4180
             } else if (stream)
4181 4181
                 get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
4182
-        } else if (!strcasecmp(cmd, "Truncate")) {
4182
+        } else if (!av_strcasecmp(cmd, "Truncate")) {
4183 4183
             if (feed) {
4184 4184
                 get_arg(arg, sizeof(arg), &p);
4185 4185
                 feed->truncate = strtod(arg, NULL);
4186 4186
             }
4187
-        } else if (!strcasecmp(cmd, "FileMaxSize")) {
4187
+        } else if (!av_strcasecmp(cmd, "FileMaxSize")) {
4188 4188
             if (feed) {
4189 4189
                 char *p1;
4190 4190
                 double fsize;
... ...
@@ -4208,12 +4207,12 @@ static int parse_ffconfig(const char *filename)
4208 4208
                     ERROR("Feed max file size is too small, must be at least %d\n", FFM_PACKET_SIZE*4);
4209 4209
                 }
4210 4210
             }
4211
-        } else if (!strcasecmp(cmd, "</Feed>")) {
4211
+        } else if (!av_strcasecmp(cmd, "</Feed>")) {
4212 4212
             if (!feed) {
4213 4213
                 ERROR("No corresponding <Feed> for </Feed>\n");
4214 4214
             }
4215 4215
             feed = NULL;
4216
-        } else if (!strcasecmp(cmd, "<Stream")) {
4216
+        } else if (!av_strcasecmp(cmd, "<Stream")) {
4217 4217
             /*********************************************/
4218 4218
             /* Stream related options */
4219 4219
             char *q;
... ...
@@ -4246,7 +4245,7 @@ static int parse_ffconfig(const char *filename)
4246 4246
                 *last_stream = stream;
4247 4247
                 last_stream = &stream->next;
4248 4248
             }
4249
-        } else if (!strcasecmp(cmd, "Feed")) {
4249
+        } else if (!av_strcasecmp(cmd, "Feed")) {
4250 4250
             get_arg(arg, sizeof(arg), &p);
4251 4251
             if (stream) {
4252 4252
                 FFStream *sfeed;
... ...
@@ -4262,7 +4261,7 @@ static int parse_ffconfig(const char *filename)
4262 4262
                 else
4263 4263
                     stream->feed = sfeed;
4264 4264
             }
4265
-        } else if (!strcasecmp(cmd, "Format")) {
4265
+        } else if (!av_strcasecmp(cmd, "Format")) {
4266 4266
             get_arg(arg, sizeof(arg), &p);
4267 4267
             if (stream) {
4268 4268
                 if (!strcmp(arg, "status")) {
... ...
@@ -4283,7 +4282,7 @@ static int parse_ffconfig(const char *filename)
4283 4283
                     video_id = stream->fmt->video_codec;
4284 4284
                 }
4285 4285
             }
4286
-        } else if (!strcasecmp(cmd, "InputFormat")) {
4286
+        } else if (!av_strcasecmp(cmd, "InputFormat")) {
4287 4287
             get_arg(arg, sizeof(arg), &p);
4288 4288
             if (stream) {
4289 4289
                 stream->ifmt = av_find_input_format(arg);
... ...
@@ -4291,65 +4290,65 @@ static int parse_ffconfig(const char *filename)
4291 4291
                     ERROR("Unknown input format: %s\n", arg);
4292 4292
                 }
4293 4293
             }
4294
-        } else if (!strcasecmp(cmd, "FaviconURL")) {
4294
+        } else if (!av_strcasecmp(cmd, "FaviconURL")) {
4295 4295
             if (stream && stream->stream_type == STREAM_TYPE_STATUS) {
4296 4296
                 get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
4297 4297
             } else {
4298 4298
                 ERROR("FaviconURL only permitted for status streams\n");
4299 4299
             }
4300
-        } else if (!strcasecmp(cmd, "Author")) {
4300
+        } else if (!av_strcasecmp(cmd, "Author")) {
4301 4301
             if (stream)
4302 4302
                 get_arg(stream->author, sizeof(stream->author), &p);
4303
-        } else if (!strcasecmp(cmd, "Comment")) {
4303
+        } else if (!av_strcasecmp(cmd, "Comment")) {
4304 4304
             if (stream)
4305 4305
                 get_arg(stream->comment, sizeof(stream->comment), &p);
4306
-        } else if (!strcasecmp(cmd, "Copyright")) {
4306
+        } else if (!av_strcasecmp(cmd, "Copyright")) {
4307 4307
             if (stream)
4308 4308
                 get_arg(stream->copyright, sizeof(stream->copyright), &p);
4309
-        } else if (!strcasecmp(cmd, "Title")) {
4309
+        } else if (!av_strcasecmp(cmd, "Title")) {
4310 4310
             if (stream)
4311 4311
                 get_arg(stream->title, sizeof(stream->title), &p);
4312
-        } else if (!strcasecmp(cmd, "Preroll")) {
4312
+        } else if (!av_strcasecmp(cmd, "Preroll")) {
4313 4313
             get_arg(arg, sizeof(arg), &p);
4314 4314
             if (stream)
4315 4315
                 stream->prebuffer = atof(arg) * 1000;
4316
-        } else if (!strcasecmp(cmd, "StartSendOnKey")) {
4316
+        } else if (!av_strcasecmp(cmd, "StartSendOnKey")) {
4317 4317
             if (stream)
4318 4318
                 stream->send_on_key = 1;
4319
-        } else if (!strcasecmp(cmd, "AudioCodec")) {
4319
+        } else if (!av_strcasecmp(cmd, "AudioCodec")) {
4320 4320
             get_arg(arg, sizeof(arg), &p);
4321 4321
             audio_id = opt_audio_codec(arg);
4322 4322
             if (audio_id == CODEC_ID_NONE) {
4323 4323
                 ERROR("Unknown AudioCodec: %s\n", arg);
4324 4324
             }
4325
-        } else if (!strcasecmp(cmd, "VideoCodec")) {
4325
+        } else if (!av_strcasecmp(cmd, "VideoCodec")) {
4326 4326
             get_arg(arg, sizeof(arg), &p);
4327 4327
             video_id = opt_video_codec(arg);
4328 4328
             if (video_id == CODEC_ID_NONE) {
4329 4329
                 ERROR("Unknown VideoCodec: %s\n", arg);
4330 4330
             }
4331
-        } else if (!strcasecmp(cmd, "MaxTime")) {
4331
+        } else if (!av_strcasecmp(cmd, "MaxTime")) {
4332 4332
             get_arg(arg, sizeof(arg), &p);
4333 4333
             if (stream)
4334 4334
                 stream->max_time = atof(arg) * 1000;
4335
-        } else if (!strcasecmp(cmd, "AudioBitRate")) {
4335
+        } else if (!av_strcasecmp(cmd, "AudioBitRate")) {
4336 4336
             get_arg(arg, sizeof(arg), &p);
4337 4337
             if (stream)
4338 4338
                 audio_enc.bit_rate = lrintf(atof(arg) * 1000);
4339
-        } else if (!strcasecmp(cmd, "AudioChannels")) {
4339
+        } else if (!av_strcasecmp(cmd, "AudioChannels")) {
4340 4340
             get_arg(arg, sizeof(arg), &p);
4341 4341
             if (stream)
4342 4342
                 audio_enc.channels = atoi(arg);
4343
-        } else if (!strcasecmp(cmd, "AudioSampleRate")) {
4343
+        } else if (!av_strcasecmp(cmd, "AudioSampleRate")) {
4344 4344
             get_arg(arg, sizeof(arg), &p);
4345 4345
             if (stream)
4346 4346
                 audio_enc.sample_rate = atoi(arg);
4347
-        } else if (!strcasecmp(cmd, "AudioQuality")) {
4347
+        } else if (!av_strcasecmp(cmd, "AudioQuality")) {
4348 4348
             get_arg(arg, sizeof(arg), &p);
4349 4349
             if (stream) {
4350 4350
 //                audio_enc.quality = atof(arg) * 1000;
4351 4351
             }
4352
-        } else if (!strcasecmp(cmd, "VideoBitRateRange")) {
4352
+        } else if (!av_strcasecmp(cmd, "VideoBitRateRange")) {
4353 4353
             if (stream) {
4354 4354
                 int minrate, maxrate;
4355 4355
 
... ...
@@ -4362,32 +4361,32 @@ static int parse_ffconfig(const char *filename)
4362 4362
                     ERROR("Incorrect format for VideoBitRateRange -- should be <min>-<max>: %s\n", arg);
4363 4363
                 }
4364 4364
             }
4365
-        } else if (!strcasecmp(cmd, "Debug")) {
4365
+        } else if (!av_strcasecmp(cmd, "Debug")) {
4366 4366
             if (stream) {
4367 4367
                 get_arg(arg, sizeof(arg), &p);
4368 4368
                 video_enc.debug = strtol(arg,0,0);
4369 4369
             }
4370
-        } else if (!strcasecmp(cmd, "Strict")) {
4370
+        } else if (!av_strcasecmp(cmd, "Strict")) {
4371 4371
             if (stream) {
4372 4372
                 get_arg(arg, sizeof(arg), &p);
4373 4373
                 video_enc.strict_std_compliance = atoi(arg);
4374 4374
             }
4375
-        } else if (!strcasecmp(cmd, "VideoBufferSize")) {
4375
+        } else if (!av_strcasecmp(cmd, "VideoBufferSize")) {
4376 4376
             if (stream) {
4377 4377
                 get_arg(arg, sizeof(arg), &p);
4378 4378
                 video_enc.rc_buffer_size = atoi(arg) * 8*1024;
4379 4379
             }
4380
-        } else if (!strcasecmp(cmd, "VideoBitRateTolerance")) {
4380
+        } else if (!av_strcasecmp(cmd, "VideoBitRateTolerance")) {
4381 4381
             if (stream) {
4382 4382
                 get_arg(arg, sizeof(arg), &p);
4383 4383
                 video_enc.bit_rate_tolerance = atoi(arg) * 1000;
4384 4384
             }
4385
-        } else if (!strcasecmp(cmd, "VideoBitRate")) {
4385
+        } else if (!av_strcasecmp(cmd, "VideoBitRate")) {
4386 4386
             get_arg(arg, sizeof(arg), &p);
4387 4387
             if (stream) {
4388 4388
                 video_enc.bit_rate = atoi(arg) * 1000;
4389 4389
             }
4390
-        } else if (!strcasecmp(cmd, "VideoSize")) {
4390
+        } else if (!av_strcasecmp(cmd, "VideoSize")) {
4391 4391
             get_arg(arg, sizeof(arg), &p);
4392 4392
             if (stream) {
4393 4393
                 av_parse_video_size(&video_enc.width, &video_enc.height, arg);
... ...
@@ -4396,7 +4395,7 @@ static int parse_ffconfig(const char *filename)
4396 4396
                     ERROR("Image size must be a multiple of 16\n");
4397 4397
                 }
4398 4398
             }
4399
-        } else if (!strcasecmp(cmd, "VideoFrameRate")) {
4399
+        } else if (!av_strcasecmp(cmd, "VideoFrameRate")) {
4400 4400
             get_arg(arg, sizeof(arg), &p);
4401 4401
             if (stream) {
4402 4402
                 AVRational frame_rate;
... ...
@@ -4407,29 +4406,29 @@ static int parse_ffconfig(const char *filename)
4407 4407
                     video_enc.time_base.den = frame_rate.num;
4408 4408
                 }
4409 4409
             }
4410
-        } else if (!strcasecmp(cmd, "VideoGopSize")) {
4410
+        } else if (!av_strcasecmp(cmd, "VideoGopSize")) {
4411 4411
             get_arg(arg, sizeof(arg), &p);
4412 4412
             if (stream)
4413 4413
                 video_enc.gop_size = atoi(arg);
4414
-        } else if (!strcasecmp(cmd, "VideoIntraOnly")) {
4414
+        } else if (!av_strcasecmp(cmd, "VideoIntraOnly")) {
4415 4415
             if (stream)
4416 4416
                 video_enc.gop_size = 1;
4417
-        } else if (!strcasecmp(cmd, "VideoHighQuality")) {
4417
+        } else if (!av_strcasecmp(cmd, "VideoHighQuality")) {
4418 4418
             if (stream)
4419 4419
                 video_enc.mb_decision = FF_MB_DECISION_BITS;
4420
-        } else if (!strcasecmp(cmd, "Video4MotionVector")) {
4420
+        } else if (!av_strcasecmp(cmd, "Video4MotionVector")) {
4421 4421
             if (stream) {
4422 4422
                 video_enc.mb_decision = FF_MB_DECISION_BITS; //FIXME remove
4423 4423
                 video_enc.flags |= CODEC_FLAG_4MV;
4424 4424
             }
4425
-        } else if (!strcasecmp(cmd, "AVOptionVideo") ||
4426
-                   !strcasecmp(cmd, "AVOptionAudio")) {
4425
+        } else if (!av_strcasecmp(cmd, "AVOptionVideo") ||
4426
+                   !av_strcasecmp(cmd, "AVOptionAudio")) {
4427 4427
             char arg2[1024];
4428 4428
             AVCodecContext *avctx;
4429 4429
             int type;
4430 4430
             get_arg(arg, sizeof(arg), &p);
4431 4431
             get_arg(arg2, sizeof(arg2), &p);
4432
-            if (!strcasecmp(cmd, "AVOptionVideo")) {
4432
+            if (!av_strcasecmp(cmd, "AVOptionVideo")) {
4433 4433
                 avctx = &video_enc;
4434 4434
                 type = AV_OPT_FLAG_VIDEO_PARAM;
4435 4435
             } else {
... ...
@@ -4439,12 +4438,12 @@ static int parse_ffconfig(const char *filename)
4439 4439
             if (avserver_opt_default(arg, arg2, avctx, type|AV_OPT_FLAG_ENCODING_PARAM)) {
4440 4440
                 ERROR("AVOption error: %s %s\n", arg, arg2);
4441 4441
             }
4442
-        } else if (!strcasecmp(cmd, "AVPresetVideo") ||
4443
-                   !strcasecmp(cmd, "AVPresetAudio")) {
4442
+        } else if (!av_strcasecmp(cmd, "AVPresetVideo") ||
4443
+                   !av_strcasecmp(cmd, "AVPresetAudio")) {
4444 4444
             AVCodecContext *avctx;
4445 4445
             int type;
4446 4446
             get_arg(arg, sizeof(arg), &p);
4447
-            if (!strcasecmp(cmd, "AVPresetVideo")) {
4447
+            if (!av_strcasecmp(cmd, "AVPresetVideo")) {
4448 4448
                 avctx = &video_enc;
4449 4449
                 video_enc.codec_id = video_id;
4450 4450
                 type = AV_OPT_FLAG_VIDEO_PARAM;
... ...
@@ -4456,26 +4455,26 @@ static int parse_ffconfig(const char *filename)
4456 4456
             if (avserver_opt_preset(arg, avctx, type|AV_OPT_FLAG_ENCODING_PARAM, &audio_id, &video_id)) {
4457 4457
                 ERROR("AVPreset error: %s\n", arg);
4458 4458
             }
4459
-        } else if (!strcasecmp(cmd, "VideoTag")) {
4459
+        } else if (!av_strcasecmp(cmd, "VideoTag")) {
4460 4460
             get_arg(arg, sizeof(arg), &p);
4461 4461
             if ((strlen(arg) == 4) && stream)
4462 4462
                 video_enc.codec_tag = MKTAG(arg[0], arg[1], arg[2], arg[3]);
4463
-        } else if (!strcasecmp(cmd, "BitExact")) {
4463
+        } else if (!av_strcasecmp(cmd, "BitExact")) {
4464 4464
             if (stream)
4465 4465
                 video_enc.flags |= CODEC_FLAG_BITEXACT;
4466
-        } else if (!strcasecmp(cmd, "DctFastint")) {
4466
+        } else if (!av_strcasecmp(cmd, "DctFastint")) {
4467 4467
             if (stream)
4468 4468
                 video_enc.dct_algo  = FF_DCT_FASTINT;
4469
-        } else if (!strcasecmp(cmd, "IdctSimple")) {
4469
+        } else if (!av_strcasecmp(cmd, "IdctSimple")) {
4470 4470
             if (stream)
4471 4471
                 video_enc.idct_algo = FF_IDCT_SIMPLE;
4472
-        } else if (!strcasecmp(cmd, "Qscale")) {
4472
+        } else if (!av_strcasecmp(cmd, "Qscale")) {
4473 4473
             get_arg(arg, sizeof(arg), &p);
4474 4474
             if (stream) {
4475 4475
                 video_enc.flags |= CODEC_FLAG_QSCALE;
4476 4476
                 video_enc.global_quality = FF_QP2LAMBDA * atoi(arg);
4477 4477
             }
4478
-        } else if (!strcasecmp(cmd, "VideoQDiff")) {
4478
+        } else if (!av_strcasecmp(cmd, "VideoQDiff")) {
4479 4479
             get_arg(arg, sizeof(arg), &p);
4480 4480
             if (stream) {
4481 4481
                 video_enc.max_qdiff = atoi(arg);
... ...
@@ -4483,7 +4482,7 @@ static int parse_ffconfig(const char *filename)
4483 4483
                     ERROR("VideoQDiff out of range\n");
4484 4484
                 }
4485 4485
             }
4486
-        } else if (!strcasecmp(cmd, "VideoQMax")) {
4486
+        } else if (!av_strcasecmp(cmd, "VideoQMax")) {
4487 4487
             get_arg(arg, sizeof(arg), &p);
4488 4488
             if (stream) {
4489 4489
                 video_enc.qmax = atoi(arg);
... ...
@@ -4491,7 +4490,7 @@ static int parse_ffconfig(const char *filename)
4491 4491
                     ERROR("VideoQMax out of range\n");
4492 4492
                 }
4493 4493
             }
4494
-        } else if (!strcasecmp(cmd, "VideoQMin")) {
4494
+        } else if (!av_strcasecmp(cmd, "VideoQMin")) {
4495 4495
             get_arg(arg, sizeof(arg), &p);
4496 4496
             if (stream) {
4497 4497
                 video_enc.qmin = atoi(arg);
... ...
@@ -4499,39 +4498,39 @@ static int parse_ffconfig(const char *filename)
4499 4499
                     ERROR("VideoQMin out of range\n");
4500 4500
                 }
4501 4501
             }
4502
-        } else if (!strcasecmp(cmd, "LumaElim")) {
4502
+        } else if (!av_strcasecmp(cmd, "LumaElim")) {
4503 4503
             get_arg(arg, sizeof(arg), &p);
4504 4504
             if (stream)
4505 4505
                 video_enc.luma_elim_threshold = atoi(arg);
4506
-        } else if (!strcasecmp(cmd, "ChromaElim")) {
4506
+        } else if (!av_strcasecmp(cmd, "ChromaElim")) {
4507 4507
             get_arg(arg, sizeof(arg), &p);
4508 4508
             if (stream)
4509 4509
                 video_enc.chroma_elim_threshold = atoi(arg);
4510
-        } else if (!strcasecmp(cmd, "LumiMask")) {
4510
+        } else if (!av_strcasecmp(cmd, "LumiMask")) {
4511 4511
             get_arg(arg, sizeof(arg), &p);
4512 4512
             if (stream)
4513 4513
                 video_enc.lumi_masking = atof(arg);
4514
-        } else if (!strcasecmp(cmd, "DarkMask")) {
4514
+        } else if (!av_strcasecmp(cmd, "DarkMask")) {
4515 4515
             get_arg(arg, sizeof(arg), &p);
4516 4516
             if (stream)
4517 4517
                 video_enc.dark_masking = atof(arg);
4518
-        } else if (!strcasecmp(cmd, "NoVideo")) {
4518
+        } else if (!av_strcasecmp(cmd, "NoVideo")) {
4519 4519
             video_id = CODEC_ID_NONE;
4520
-        } else if (!strcasecmp(cmd, "NoAudio")) {
4520
+        } else if (!av_strcasecmp(cmd, "NoAudio")) {
4521 4521
             audio_id = CODEC_ID_NONE;
4522
-        } else if (!strcasecmp(cmd, "ACL")) {
4522
+        } else if (!av_strcasecmp(cmd, "ACL")) {
4523 4523
             parse_acl_row(stream, feed, NULL, p, filename, line_num);
4524
-        } else if (!strcasecmp(cmd, "DynamicACL")) {
4524
+        } else if (!av_strcasecmp(cmd, "DynamicACL")) {
4525 4525
             if (stream) {
4526 4526
                 get_arg(stream->dynamic_acl, sizeof(stream->dynamic_acl), &p);
4527 4527
             }
4528
-        } else if (!strcasecmp(cmd, "RTSPOption")) {
4528
+        } else if (!av_strcasecmp(cmd, "RTSPOption")) {
4529 4529
             get_arg(arg, sizeof(arg), &p);
4530 4530
             if (stream) {
4531 4531
                 av_freep(&stream->rtsp_option);
4532 4532
                 stream->rtsp_option = av_strdup(arg);
4533 4533
             }
4534
-        } else if (!strcasecmp(cmd, "MulticastAddress")) {
4534
+        } else if (!av_strcasecmp(cmd, "MulticastAddress")) {
4535 4535
             get_arg(arg, sizeof(arg), &p);
4536 4536
             if (stream) {
4537 4537
                 if (resolve_host(&stream->multicast_ip, arg) != 0) {
... ...
@@ -4540,18 +4539,18 @@ static int parse_ffconfig(const char *filename)
4540 4540
                 stream->is_multicast = 1;
4541 4541
                 stream->loop = 1; /* default is looping */
4542 4542
             }
4543
-        } else if (!strcasecmp(cmd, "MulticastPort")) {
4543
+        } else if (!av_strcasecmp(cmd, "MulticastPort")) {
4544 4544
             get_arg(arg, sizeof(arg), &p);
4545 4545
             if (stream)
4546 4546
                 stream->multicast_port = atoi(arg);
4547
-        } else if (!strcasecmp(cmd, "MulticastTTL")) {
4547
+        } else if (!av_strcasecmp(cmd, "MulticastTTL")) {
4548 4548
             get_arg(arg, sizeof(arg), &p);
4549 4549
             if (stream)
4550 4550
                 stream->multicast_ttl = atoi(arg);
4551
-        } else if (!strcasecmp(cmd, "NoLoop")) {
4551
+        } else if (!av_strcasecmp(cmd, "NoLoop")) {
4552 4552
             if (stream)
4553 4553
                 stream->loop = 0;
4554
-        } else if (!strcasecmp(cmd, "</Stream>")) {
4554
+        } else if (!av_strcasecmp(cmd, "</Stream>")) {
4555 4555
             if (!stream) {
4556 4556
                 ERROR("No corresponding <Stream> for </Stream>\n");
4557 4557
             } else {
... ...
@@ -4569,7 +4568,7 @@ static int parse_ffconfig(const char *filename)
4569 4569
                 }
4570 4570
                 stream = NULL;
4571 4571
             }
4572
-        } else if (!strcasecmp(cmd, "<Redirect")) {
4572
+        } else if (!av_strcasecmp(cmd, "<Redirect")) {
4573 4573
             /*********************************************/
4574 4574
             char *q;
4575 4575
             if (stream || feed || redirect) {
... ...
@@ -4585,10 +4584,10 @@ static int parse_ffconfig(const char *filename)
4585 4585
                     *q = '\0';
4586 4586
                 redirect->stream_type = STREAM_TYPE_REDIRECT;
4587 4587
             }
4588
-        } else if (!strcasecmp(cmd, "URL")) {
4588
+        } else if (!av_strcasecmp(cmd, "URL")) {
4589 4589
             if (redirect)
4590 4590
                 get_arg(redirect->feed_filename, sizeof(redirect->feed_filename), &p);
4591
-        } else if (!strcasecmp(cmd, "</Redirect>")) {
4591
+        } else if (!av_strcasecmp(cmd, "</Redirect>")) {
4592 4592
             if (!redirect) {
4593 4593
                 ERROR("No corresponding <Redirect> for </Redirect>\n");
4594 4594
             } else {
... ...
@@ -4597,7 +4596,7 @@ static int parse_ffconfig(const char *filename)
4597 4597
                 }
4598 4598
                 redirect = NULL;
4599 4599
             }
4600
-        } else if (!strcasecmp(cmd, "LoadModule")) {
4600
+        } else if (!av_strcasecmp(cmd, "LoadModule")) {
4601 4601
             get_arg(arg, sizeof(arg), &p);
4602 4602
 #if HAVE_DLOPEN
4603 4603
             load_module(arg);
... ...
@@ -42,12 +42,12 @@
42 42
 #include <linux/videodev2.h>
43 43
 #endif
44 44
 #include <time.h>
45
-#include <strings.h>
46 45
 #include "libavutil/imgutils.h"
47 46
 #include "libavutil/log.h"
48 47
 #include "libavutil/opt.h"
49 48
 #include "libavutil/parseutils.h"
50 49
 #include "libavutil/pixdesc.h"
50
+#include "libavutil/avstring.h"
51 51
 
52 52
 static const int desired_video_buffers = 256;
53 53
 
... ...
@@ -493,7 +493,7 @@ static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap)
493 493
                 return AVERROR(EIO);
494 494
             }
495 495
 
496
-            if (!strcasecmp(standard.name, s->standard)) {
496
+            if (!av_strcasecmp(standard.name, s->standard)) {
497 497
                 break;
498 498
             }
499 499
         }
... ...
@@ -19,11 +19,11 @@
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21 21
 
22
-#include <strings.h>
23 22
 #include "libavutil/intreadwrite.h"
24 23
 #include "libavutil/mathematics.h"
25 24
 #include "libavutil/bswap.h"
26 25
 #include "libavutil/dict.h"
26
+#include "libavutil/avstring.h"
27 27
 #include "avformat.h"
28 28
 #include "avi.h"
29 29
 #include "dv.h"
... ...
@@ -281,7 +281,7 @@ static void avi_metadata_creation_time(AVDictionary **metadata, char *date)
281 281
     if (sscanf(date, "%*3s%*[ ]%3s%*[ ]%2d%*[ ]%8s%*[ ]%4d",
282 282
                month, &day, time, &year) == 4) {
283 283
         for (i=0; i<12; i++)
284
-            if (!strcasecmp(month, months[i])) {
284
+            if (!av_strcasecmp(month, months[i])) {
285 285
                 snprintf(buffer, sizeof(buffer), "%.4d-%.2d-%.2d %s",
286 286
                          year, i+1, day, time);
287 287
                 av_dict_set(metadata, "creation_time", buffer, 0);
... ...
@@ -22,7 +22,6 @@
22 22
 #include "libavutil/avstring.h"
23 23
 #include "avformat.h"
24 24
 #include <unistd.h>
25
-#include <strings.h>
26 25
 #include "internal.h"
27 26
 #include "network.h"
28 27
 #include "http.h"
... ...
@@ -251,12 +250,12 @@ static int process_line(URLContext *h, char *line, int line_count,
251 251
         p++;
252 252
         while (isspace(*p))
253 253
             p++;
254
-        if (!strcasecmp(tag, "Location")) {
254
+        if (!av_strcasecmp(tag, "Location")) {
255 255
             strcpy(s->location, p);
256 256
             *new_location = 1;
257
-        } else if (!strcasecmp (tag, "Content-Length") && s->filesize == -1) {
257
+        } else if (!av_strcasecmp (tag, "Content-Length") && s->filesize == -1) {
258 258
             s->filesize = atoll(p);
259
-        } else if (!strcasecmp (tag, "Content-Range")) {
259
+        } else if (!av_strcasecmp (tag, "Content-Range")) {
260 260
             /* "bytes $from-$to/$document_size" */
261 261
             const char *slash;
262 262
             if (!strncmp (p, "bytes ", 6)) {
... ...
@@ -266,16 +265,16 @@ static int process_line(URLContext *h, char *line, int line_count,
266 266
                     s->filesize = atoll(slash+1);
267 267
             }
268 268
             h->is_streamed = 0; /* we _can_ in fact seek */
269
-        } else if (!strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5)) {
269
+        } else if (!av_strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5)) {
270 270
             h->is_streamed = 0;
271
-        } else if (!strcasecmp (tag, "Transfer-Encoding") && !strncasecmp(p, "chunked", 7)) {
271
+        } else if (!av_strcasecmp (tag, "Transfer-Encoding") && !av_strncasecmp(p, "chunked", 7)) {
272 272
             s->filesize = -1;
273 273
             s->chunksize = 0;
274
-        } else if (!strcasecmp (tag, "WWW-Authenticate")) {
274
+        } else if (!av_strcasecmp (tag, "WWW-Authenticate")) {
275 275
             ff_http_auth_handle_header(&s->auth_state, tag, p);
276
-        } else if (!strcasecmp (tag, "Authentication-Info")) {
276
+        } else if (!av_strcasecmp (tag, "Authentication-Info")) {
277 277
             ff_http_auth_handle_header(&s->auth_state, tag, p);
278
-        } else if (!strcasecmp (tag, "Connection")) {
278
+        } else if (!av_strcasecmp (tag, "Connection")) {
279 279
             if (!strcmp(p, "close"))
280 280
                 s->willclose = 1;
281 281
         }
... ...
@@ -29,7 +29,6 @@
29 29
 #include "avformat.h"
30 30
 #include "avio_internal.h"
31 31
 #include "internal.h"
32
-#include <strings.h>
33 32
 
34 33
 typedef struct {
35 34
     const AVClass *class;  /**< Class for private options. */
... ...
@@ -121,7 +120,7 @@ static enum CodecID av_str2id(const IdStrMap *tags, const char *str)
121 121
     str++;
122 122
 
123 123
     while (tags->id) {
124
-        if (!strcasecmp(str, tags->str))
124
+        if (!av_strcasecmp(str, tags->str))
125 125
             return tags->id;
126 126
 
127 127
         tags++;
... ...
@@ -33,9 +33,9 @@
33 33
 #include "libavutil/random_seed.h"
34 34
 #include "libavutil/lfg.h"
35 35
 #include "libavutil/dict.h"
36
+#include "libavutil/avstring.h"
36 37
 #include "libavcodec/xiph.h"
37 38
 #include "libavcodec/mpeg4audio.h"
38
-#include <strings.h>
39 39
 
40 40
 typedef struct ebml_master {
41 41
     int64_t         pos;                ///< absolute offset in the file where the master's elements start
... ...
@@ -760,7 +760,7 @@ static int mkv_write_tag(AVFormatContext *s, AVDictionary *m, unsigned int eleme
760 760
     end_ebml_master(s->pb, targets);
761 761
 
762 762
     while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX)))
763
-        if (strcasecmp(t->key, "title"))
763
+        if (av_strcasecmp(t->key, "title"))
764 764
             mkv_write_simpletag(s->pb, t);
765 765
 
766 766
     end_ebml_master(s->pb, tag);
... ...
@@ -18,10 +18,10 @@
18 18
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 19
  */
20 20
 
21
-#include <strings.h>
22 21
 #include "avformat.h"
23 22
 #include "metadata.h"
24 23
 #include "libavutil/dict.h"
24
+#include "libavutil/avstring.h"
25 25
 
26 26
 #if FF_API_OLD_METADATA2
27 27
 AVDictionaryEntry *
... ...
@@ -69,13 +69,13 @@ void ff_metadata_conv(AVDictionary **pm, const AVMetadataConv *d_conv,
69 69
         key = mtag->key;
70 70
         if (s_conv)
71 71
             for (sc=s_conv; sc->native; sc++)
72
-                if (!strcasecmp(key, sc->native)) {
72
+                if (!av_strcasecmp(key, sc->native)) {
73 73
                     key = sc->generic;
74 74
                     break;
75 75
                 }
76 76
         if (d_conv)
77 77
             for (dc=d_conv; dc->native; dc++)
78
-                if (!strcasecmp(key, dc->generic)) {
78
+                if (!av_strcasecmp(key, dc->generic)) {
79 79
                     key = dc->native;
80 80
                     break;
81 81
                 }
... ...
@@ -19,7 +19,6 @@
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21 21
 
22
-#include <strings.h>
23 22
 #include "avformat.h"
24 23
 #include "avio_internal.h"
25 24
 #include "id3v1.h"
... ...
@@ -64,7 +63,7 @@ static int id3v1_create_tag(AVFormatContext *s, uint8_t *buf)
64 64
     buf[127] = 0xFF; /* default to unknown genre */
65 65
     if ((tag = av_dict_get(s->metadata, "TCON", NULL, 0))) { //genre
66 66
         for(i = 0; i <= ID3v1_GENRE_MAX; i++) {
67
-            if (!strcasecmp(tag->value, ff_id3v1_genre_str[i])) {
67
+            if (!av_strcasecmp(tag->value, ff_id3v1_genre_str[i])) {
68 68
                 buf[127] = i;
69 69
                 count++;
70 70
                 break;
... ...
@@ -20,7 +20,6 @@
20 20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 21
  */
22 22
 
23
-#include <strings.h>
24 23
 #include "libavutil/avstring.h"
25 24
 #include "libavutil/bswap.h"
26 25
 #include "libavutil/dict.h"
... ...
@@ -459,8 +458,8 @@ static int decode_info_header(NUTContext *nut){
459 459
                 set_disposition_bits(s, str_value, stream_id_plus1 - 1);
460 460
                 continue;
461 461
             }
462
-            if(metadata && strcasecmp(name,"Uses")
463
-               && strcasecmp(name,"Depends") && strcasecmp(name,"Replaces"))
462
+            if(metadata && av_strcasecmp(name,"Uses")
463
+               && av_strcasecmp(name,"Depends") && av_strcasecmp(name,"Replaces"))
464 464
                 av_dict_set(metadata, name, str_value, 0);
465 465
         }
466 466
     }
... ...
@@ -20,13 +20,13 @@
20 20
  */
21 21
 
22 22
 #include "libavutil/mathematics.h"
23
+#include "libavutil/avstring.h"
23 24
 #include "libavcodec/get_bits.h"
24 25
 #include "avformat.h"
25 26
 #include "mpegts.h"
26 27
 #include "url.h"
27 28
 
28 29
 #include <unistd.h>
29
-#include <strings.h>
30 30
 #include "network.h"
31 31
 
32 32
 #include "rtpdec.h"
... ...
@@ -91,7 +91,7 @@ RTPDynamicProtocolHandler *ff_rtp_handler_find_by_name(const char *name,
91 91
     RTPDynamicProtocolHandler *handler;
92 92
     for (handler = RTPFirstDynamicPayloadHandler;
93 93
          handler; handler = handler->next)
94
-        if (!strcasecmp(name, handler->enc_name) &&
94
+        if (!av_strcasecmp(name, handler->enc_name) &&
95 95
             codec_type == handler->codec_type)
96 96
             return handler;
97 97
     return NULL;
... ...
@@ -31,7 +31,6 @@
31 31
 #include "internal.h"
32 32
 #include "libavutil/avstring.h"
33 33
 #include "libavcodec/get_bits.h"
34
-#include <strings.h>
35 34
 
36 35
 /** Structure listing useful vars to parse RTP packet payload*/
37 36
 struct PayloadContext
... ...
@@ -206,7 +205,7 @@ static int parse_fmtp(AVStream *stream, PayloadContext *data,
206 206
     if (codec->codec_id == CODEC_ID_AAC) {
207 207
         /* Looking for a known attribute */
208 208
         for (i = 0; attr_names[i].str; ++i) {
209
-            if (!strcasecmp(attr, attr_names[i].str)) {
209
+            if (!av_strcasecmp(attr, attr_names[i].str)) {
210 210
                 if (attr_names[i].type == ATTR_NAME_TYPE_INT) {
211 211
                     *(int *)((char *)data+
212 212
                         attr_names[i].offset) = atoi(value);
... ...
@@ -34,7 +34,6 @@
34 34
 #if HAVE_POLL_H
35 35
 #include <poll.h>
36 36
 #endif
37
-#include <strings.h>
38 37
 #include "internal.h"
39 38
 #include "network.h"
40 39
 #include "os_support.h"
... ...
@@ -661,7 +660,7 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
661 661
 
662 662
         get_word_sep(transport_protocol, sizeof(transport_protocol),
663 663
                      "/", &p);
664
-        if (!strcasecmp (transport_protocol, "rtp")) {
664
+        if (!av_strcasecmp (transport_protocol, "rtp")) {
665 665
             get_word_sep(profile, sizeof(profile), "/;,", &p);
666 666
             lower_transport[0] = '\0';
667 667
             /* rtp/avp/<protocol> */
... ...
@@ -670,14 +669,14 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
670 670
                              ";,", &p);
671 671
             }
672 672
             th->transport = RTSP_TRANSPORT_RTP;
673
-        } else if (!strcasecmp (transport_protocol, "x-pn-tng") ||
674
-                   !strcasecmp (transport_protocol, "x-real-rdt")) {
673
+        } else if (!av_strcasecmp (transport_protocol, "x-pn-tng") ||
674
+                   !av_strcasecmp (transport_protocol, "x-real-rdt")) {
675 675
             /* x-pn-tng/<protocol> */
676 676
             get_word_sep(lower_transport, sizeof(lower_transport), "/;,", &p);
677 677
             profile[0] = '\0';
678 678
             th->transport = RTSP_TRANSPORT_RDT;
679 679
         }
680
-        if (!strcasecmp(lower_transport, "TCP"))
680
+        if (!av_strcasecmp(lower_transport, "TCP"))
681 681
             th->lower_transport = RTSP_LOWER_TRANSPORT_TCP;
682 682
         else
683 683
             th->lower_transport = RTSP_LOWER_TRANSPORT_UDP;
... ...
@@ -1556,7 +1555,7 @@ redirect:
1556 1556
         if (rt->server_type != RTSP_SERVER_REAL && reply->real_challenge[0]) {
1557 1557
             rt->server_type = RTSP_SERVER_REAL;
1558 1558
             continue;
1559
-        } else if (!strncasecmp(reply->server, "WMServer/", 9)) {
1559
+        } else if (!av_strncasecmp(reply->server, "WMServer/", 9)) {
1560 1560
             rt->server_type = RTSP_SERVER_WMS;
1561 1561
         } else if (rt->server_type == RTSP_SERVER_REAL)
1562 1562
             strcpy(real_challenge, reply->real_challenge);
... ...
@@ -37,7 +37,6 @@
37 37
 #include "url.h"
38 38
 #include <sys/time.h>
39 39
 #include <time.h>
40
-#include <strings.h>
41 40
 #include <stdarg.h>
42 41
 #if CONFIG_NETWORK
43 42
 #include "network.h"
... ...
@@ -169,7 +168,7 @@ int av_match_ext(const char *filename, const char *extensions)
169 169
             while (*p != '\0' && *p != ',' && q-ext1<sizeof(ext1)-1)
170 170
                 *q++ = *p++;
171 171
             *q = '\0';
172
-            if (!strcasecmp(ext1, ext))
172
+            if (!av_strcasecmp(ext1, ext))
173 173
                 return 1;
174 174
             if (*p == '\0')
175 175
                 break;
... ...
@@ -190,11 +189,11 @@ static int match_format(const char *name, const char *names)
190 190
     namelen = strlen(name);
191 191
     while ((p = strchr(names, ','))) {
192 192
         len = FFMAX(p - names, namelen);
193
-        if (!strncasecmp(name, names, len))
193
+        if (!av_strncasecmp(name, names, len))
194 194
             return 1;
195 195
         names = p+1;
196 196
     }
197
-    return !strcasecmp(name, names);
197
+    return !av_strcasecmp(name, names);
198 198
 }
199 199
 
200 200
 AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
... ...
@@ -21,7 +21,6 @@
21 21
  * misc parsing utilities
22 22
  */
23 23
 
24
-#include <strings.h>
25 24
 #include <sys/time.h>
26 25
 #include <time.h>
27 26
 
... ...
@@ -294,7 +293,7 @@ static ColorEntry color_table[] = {
294 294
 
295 295
 static int color_table_compare(const void *lhs, const void *rhs)
296 296
 {
297
-    return strcasecmp(lhs, ((const ColorEntry *)rhs)->name);
297
+    return av_strcasecmp(lhs, ((const ColorEntry *)rhs)->name);
298 298
 }
299 299
 
300 300
 #define ALPHA_SEP '@'
... ...
@@ -320,7 +319,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
320 320
     len = strlen(color_string2);
321 321
     rgba_color[3] = 255;
322 322
 
323
-    if (!strcasecmp(color_string2, "random") || !strcasecmp(color_string2, "bikeshed")) {
323
+    if (!av_strcasecmp(color_string2, "random") || !av_strcasecmp(color_string2, "bikeshed")) {
324 324
         int rgba = av_get_random_seed();
325 325
         rgba_color[0] = rgba >> 24;
326 326
         rgba_color[1] = rgba >> 16;
... ...
@@ -515,7 +514,7 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration)
515 515
     p = timestr;
516 516
     q = NULL;
517 517
     if (!duration) {
518
-        if (!strncasecmp(timestr, "now", len)) {
518
+        if (!av_strncasecmp(timestr, "now", len)) {
519 519
             *timeval = (int64_t) now * 1000000;
520 520
             return 0;
521 521
         }