History

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.

Reimar Döffinger committed 15 years ago

Commit bb3244d1 parent ba04ecf14 files · +123 −132Browse files

Unified · Split

14 files
  1. avserver.c +88 −89
  2. libavdevice/v4l2.c +2 −2
  3. libavformat/avidec.c +2 −2
  4. libavformat/http.c +8 −9
  5. libavformat/img2.c +1 −2
  6. libavformat/matroskaenc.c +2 −2
  7. libavformat/metadata.c +3 −3
  8. libavformat/mp3enc.c +1 −2
  9. libavformat/nutdec.c +2 −3
  10. libavformat/rtpdec.c +2 −2
  11. libavformat/rtpdec_mpeg4.c +1 −2
  12. libavformat/rtsp.c +5 −6
  13. libavformat/utils.c +3 −4
  14. libavutil/parseutils.c +3 −4
avserver.c+88−89
@@ -24,7 +24,6 @@ · 23 unmodified lines
2424 #define closesocket close
2525 #endif
2626 #include <string.h>
27−#include <strings.h>
2827 #include <stdlib.h>
2928 #include "libavformat/avformat.h"
3029 #include "libavformat/ffm.h"
@@ -1085,13 +1084,13 @@ static int extract_rates(char *rates, int ratelen, const char *request) · 1054 unmodified lines
10851084 const char *p;
10861085
10871086 for (p = request; *p && *p != '\r' && *p != '\n'; ) {
1088− if (strncasecmp(p, "Pragma:", 7) == 0) {
1087+ if (av_strncasecmp(p, "Pragma:", 7) == 0) {
10891088 const char *q = p + 7;
10901089
10911090 while (*q && *q != '\n' && isspace(*q))
10921091 q++;
10931092
1094− if (strncasecmp(q, "stream-switch-entry=", 20) == 0) {
1093+ if (av_strncasecmp(q, "stream-switch-entry=", 20) == 0) {
10951094 int stream_no;
10961095 int rate_no;
10971096
@@ -1271,9 +1270,9 @@ static void parse_acl_row(FFStream *stream, FFStream* feed, IPAddressACL *ext_ac · 173 unmodified lines
12711270 int errors = 0;
12721271
12731272 get_arg(arg, sizeof(arg), &p);
1274− if (strcasecmp(arg, "allow") == 0)
1273+ if (av_strcasecmp(arg, "allow") == 0)
12751274 acl.action = IP_ALLOW;
1276− else if (strcasecmp(arg, "deny") == 0)
1275+ else if (av_strcasecmp(arg, "deny") == 0)
12771276 acl.action = IP_DENY;
12781277 else {
12791278 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) · 78 unmodified lines
13581357 continue;
13591358 get_arg(cmd, sizeof(cmd), &p);
13601359
1361− if (!strcasecmp(cmd, "ACL"))
1360+ if (!av_strcasecmp(cmd, "ACL"))
13621361 parse_acl_row(NULL, NULL, acl, p, stream->dynamic_acl, line_num);
13631362 }
13641363 fclose(f);
@@ -1500,7 +1499,7 @@ static int http_parse_request(HTTPContext *c) · 135 unmodified lines
15001499 av_strlcpy(filename, url + ((*url == '/') ? 1 : 0), sizeof(filename)-1);
15011500
15021501 for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
1503− if (strncasecmp(p, "User-Agent:", 11) == 0) {
1502+ if (av_strncasecmp(p, "User-Agent:", 11) == 0) {
15041503 useragent = p + 11;
15051504 if (*useragent && *useragent != '\n' && isspace(*useragent))
15061505 useragent++;
@@ -1518,7 +1517,7 @@ static int http_parse_request(HTTPContext *c) · 11 unmodified lines
15181517 redir_type = REDIR_ASX;
15191518 filename[strlen(filename)-1] = 'f';
15201519 } else if (av_match_ext(filename, "asf") &&
1521− (!useragent || strncasecmp(useragent, "NSPlayer", 8) != 0)) {
1520+ (!useragent || av_strncasecmp(useragent, "NSPlayer", 8) != 0)) {
15221521 /* if this isn't WMP or lookalike, return the redirector file */
15231522 redir_type = REDIR_ASF;
15241523 } else if (av_match_ext(filename, "rpm,ram")) {
@@ -1613,7 +1612,7 @@ static int http_parse_request(HTTPContext *c) · 88 unmodified lines
16131612 char *hostinfo = 0;
16141613
16151614 for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
1616− if (strncasecmp(p, "Host:", 5) == 0) {
1615+ if (av_strncasecmp(p, "Host:", 5) == 0) {
16171616 hostinfo = p + 5;
16181617 break;
16191618 }
@@ -1742,11 +1741,11 @@ static int http_parse_request(HTTPContext *c) · 122 unmodified lines
17421741 int client_id = 0;
17431742
17441743 for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
1745− if (strncasecmp(p, "Pragma: log-line=", 17) == 0) {
1744+ if (av_strncasecmp(p, "Pragma: log-line=", 17) == 0) {
17461745 logline = p;
17471746 break;
17481747 }
1749− if (strncasecmp(p, "Pragma: client-id=", 18) == 0)
1748+ if (av_strncasecmp(p, "Pragma: client-id=", 18) == 0)
17501749 client_id = strtol(p + 18, 0, 10);
17511750 p = strchr(p, '\n');
17521751 if (!p)
@@ -4059,40 +4058,40 @@ static int parse_ffconfig(const char *filename) · 2306 unmodified lines
40594058
40604059 get_arg(cmd, sizeof(cmd), &p);
40614060
4062− if (!strcasecmp(cmd, "Port")) {
4061+ if (!av_strcasecmp(cmd, "Port")) {
40634062 get_arg(arg, sizeof(arg), &p);
40644063 val = atoi(arg);
40654064 if (val < 1 || val > 65536) {
40664065 ERROR("Invalid_port: %s\n", arg);
40674066 }
40684067 my_http_addr.sin_port = htons(val);
4069− } else if (!strcasecmp(cmd, "BindAddress")) {
4068+ } else if (!av_strcasecmp(cmd, "BindAddress")) {
40704069 get_arg(arg, sizeof(arg), &p);
40714070 if (resolve_host(&my_http_addr.sin_addr, arg) != 0) {
40724071 ERROR("%s:%d: Invalid host/IP address: %s\n", arg);
40734072 }
4074− } else if (!strcasecmp(cmd, "NoDaemon")) {
4073+ } else if (!av_strcasecmp(cmd, "NoDaemon")) {
40754074 avserver_daemon = 0;
4076− } else if (!strcasecmp(cmd, "RTSPPort")) {
4075+ } else if (!av_strcasecmp(cmd, "RTSPPort")) {
40774076 get_arg(arg, sizeof(arg), &p);
40784077 val = atoi(arg);
40794078 if (val < 1 || val > 65536) {
40804079 ERROR("%s:%d: Invalid port: %s\n", arg);
40814080 }
40824081 my_rtsp_addr.sin_port = htons(atoi(arg));
4083− } else if (!strcasecmp(cmd, "RTSPBindAddress")) {
4082+ } else if (!av_strcasecmp(cmd, "RTSPBindAddress")) {
40844083 get_arg(arg, sizeof(arg), &p);
40854084 if (resolve_host(&my_rtsp_addr.sin_addr, arg) != 0) {
40864085 ERROR("Invalid host/IP address: %s\n", arg);
40874086 }
4088− } else if (!strcasecmp(cmd, "MaxHTTPConnections")) {
4087+ } else if (!av_strcasecmp(cmd, "MaxHTTPConnections")) {
40894088 get_arg(arg, sizeof(arg), &p);
40904089 val = atoi(arg);
40914090 if (val < 1 || val > 65536) {
40924091 ERROR("Invalid MaxHTTPConnections: %s\n", arg);
40934092 }
40944093 nb_max_http_connections = val;
4095− } else if (!strcasecmp(cmd, "MaxClients")) {
4094+ } else if (!av_strcasecmp(cmd, "MaxClients")) {
40964095 get_arg(arg, sizeof(arg), &p);
40974096 val = atoi(arg);
40984097 if (val < 1 || val > nb_max_http_connections) {
@@ -4100,7 +4099,7 @@ static int parse_ffconfig(const char *filename) · 1 unmodified line
41004099 } else {
41014100 nb_max_connections = val;
41024101 }
4103− } else if (!strcasecmp(cmd, "MaxBandwidth")) {
4102+ } else if (!av_strcasecmp(cmd, "MaxBandwidth")) {
41044103 int64_t llval;
41054104 get_arg(arg, sizeof(arg), &p);
41064105 llval = atoll(arg);
@@ -4108,10 +4107,10 @@ static int parse_ffconfig(const char *filename) · 1 unmodified line
41084107 ERROR("Invalid MaxBandwidth: %s\n", arg);
41094108 } else
41104109 max_bandwidth = llval;
4111− } else if (!strcasecmp(cmd, "CustomLog")) {
4110+ } else if (!av_strcasecmp(cmd, "CustomLog")) {
41124111 if (!avserver_debug)
41134112 get_arg(logfilename, sizeof(logfilename), &p);
4114− } else if (!strcasecmp(cmd, "<Feed")) {
4113+ } else if (!av_strcasecmp(cmd, "<Feed")) {
41154114 /*********************************************/
41164115 /* Feed related options */
41174116 char *q;
@@ -4145,7 +4144,7 @@ static int parse_ffconfig(const char *filename) · 27 unmodified lines
41454144 *last_feed = feed;
41464145 last_feed = &feed->next_feed;
41474146 }
4148− } else if (!strcasecmp(cmd, "Launch")) {
4147+ } else if (!av_strcasecmp(cmd, "Launch")) {
41494148 if (feed) {
41504149 int i;
41514150
@@ -4167,24 +4166,24 @@ static int parse_ffconfig(const char *filename) · 15 unmodified lines
41674166 inet_ntoa(my_http_addr.sin_addr),
41684167 ntohs(my_http_addr.sin_port), feed->filename);
41694168 }
4170− } else if (!strcasecmp(cmd, "ReadOnlyFile")) {
4169+ } else if (!av_strcasecmp(cmd, "ReadOnlyFile")) {
41714170 if (feed) {
41724171 get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p);
41734172 feed->readonly = 1;
41744173 } else if (stream) {
41754174 get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
41764175 }
4177− } else if (!strcasecmp(cmd, "File")) {
4176+ } else if (!av_strcasecmp(cmd, "File")) {
41784177 if (feed) {
41794178 get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p);
41804179 } else if (stream)
41814180 get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
4182− } else if (!strcasecmp(cmd, "Truncate")) {
4181+ } else if (!av_strcasecmp(cmd, "Truncate")) {
41834182 if (feed) {
41844183 get_arg(arg, sizeof(arg), &p);
41854184 feed->truncate = strtod(arg, NULL);
41864185 }
4187− } else if (!strcasecmp(cmd, "FileMaxSize")) {
4186+ } else if (!av_strcasecmp(cmd, "FileMaxSize")) {
41884187 if (feed) {
41894188 char *p1;
41904189 double fsize;
@@ -4208,12 +4207,12 @@ static int parse_ffconfig(const char *filename) · 17 unmodified lines
42084207 ERROR("Feed max file size is too small, must be at least %d\n", FFM_PACKET_SIZE*4);
42094208 }
42104209 }
4211− } else if (!strcasecmp(cmd, "</Feed>")) {
4210+ } else if (!av_strcasecmp(cmd, "</Feed>")) {
42124211 if (!feed) {
42134212 ERROR("No corresponding <Feed> for </Feed>\n");
42144213 }
42154214 feed = NULL;
4216− } else if (!strcasecmp(cmd, "<Stream")) {
4215+ } else if (!av_strcasecmp(cmd, "<Stream")) {
42174216 /*********************************************/
42184217 /* Stream related options */
42194218 char *q;
@@ -4246,7 +4245,7 @@ static int parse_ffconfig(const char *filename) · 26 unmodified lines
42464245 *last_stream = stream;
42474246 last_stream = &stream->next;
42484247 }
4249− } else if (!strcasecmp(cmd, "Feed")) {
4248+ } else if (!av_strcasecmp(cmd, "Feed")) {
42504249 get_arg(arg, sizeof(arg), &p);
42514250 if (stream) {
42524251 FFStream *sfeed;
@@ -4262,7 +4261,7 @@ static int parse_ffconfig(const char *filename) · 9 unmodified lines
42624261 else
42634262 stream->feed = sfeed;
42644263 }
4265− } else if (!strcasecmp(cmd, "Format")) {
4264+ } else if (!av_strcasecmp(cmd, "Format")) {
42664265 get_arg(arg, sizeof(arg), &p);
42674266 if (stream) {
42684267 if (!strcmp(arg, "status")) {
@@ -4283,7 +4282,7 @@ static int parse_ffconfig(const char *filename) · 14 unmodified lines
42834282 video_id = stream->fmt->video_codec;
42844283 }
42854284 }
4286− } else if (!strcasecmp(cmd, "InputFormat")) {
4285+ } else if (!av_strcasecmp(cmd, "InputFormat")) {
42874286 get_arg(arg, sizeof(arg), &p);
42884287 if (stream) {
42894288 stream->ifmt = av_find_input_format(arg);
@@ -4291,65 +4290,65 @@ static int parse_ffconfig(const char *filename) · 1 unmodified line
42914290 ERROR("Unknown input format: %s\n", arg);
42924291 }
42934292 }
4294− } else if (!strcasecmp(cmd, "FaviconURL")) {
4293+ } else if (!av_strcasecmp(cmd, "FaviconURL")) {
42954294 if (stream && stream->stream_type == STREAM_TYPE_STATUS) {
42964295 get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
42974296 } else {
42984297 ERROR("FaviconURL only permitted for status streams\n");
42994298 }
4300− } else if (!strcasecmp(cmd, "Author")) {
4299+ } else if (!av_strcasecmp(cmd, "Author")) {
43014300 if (stream)
43024301 get_arg(stream->author, sizeof(stream->author), &p);
4303− } else if (!strcasecmp(cmd, "Comment")) {
4302+ } else if (!av_strcasecmp(cmd, "Comment")) {
43044303 if (stream)
43054304 get_arg(stream->comment, sizeof(stream->comment), &p);
4306− } else if (!strcasecmp(cmd, "Copyright")) {
4305+ } else if (!av_strcasecmp(cmd, "Copyright")) {
43074306 if (stream)
43084307 get_arg(stream->copyright, sizeof(stream->copyright), &p);
4309− } else if (!strcasecmp(cmd, "Title")) {
4308+ } else if (!av_strcasecmp(cmd, "Title")) {
43104309 if (stream)
43114310 get_arg(stream->title, sizeof(stream->title), &p);
4312− } else if (!strcasecmp(cmd, "Preroll")) {
4311+ } else if (!av_strcasecmp(cmd, "Preroll")) {
43134312 get_arg(arg, sizeof(arg), &p);
43144313 if (stream)
43154314 stream->prebuffer = atof(arg) * 1000;
4316− } else if (!strcasecmp(cmd, "StartSendOnKey")) {
4315+ } else if (!av_strcasecmp(cmd, "StartSendOnKey")) {
43174316 if (stream)
43184317 stream->send_on_key = 1;
4319− } else if (!strcasecmp(cmd, "AudioCodec")) {
4318+ } else if (!av_strcasecmp(cmd, "AudioCodec")) {
43204319 get_arg(arg, sizeof(arg), &p);
43214320 audio_id = opt_audio_codec(arg);
43224321 if (audio_id == CODEC_ID_NONE) {
43234322 ERROR("Unknown AudioCodec: %s\n", arg);
43244323 }
4325− } else if (!strcasecmp(cmd, "VideoCodec")) {
4324+ } else if (!av_strcasecmp(cmd, "VideoCodec")) {
43264325 get_arg(arg, sizeof(arg), &p);
43274326 video_id = opt_video_codec(arg);
43284327 if (video_id == CODEC_ID_NONE) {
43294328 ERROR("Unknown VideoCodec: %s\n", arg);
43304329 }
4331− } else if (!strcasecmp(cmd, "MaxTime")) {
4330+ } else if (!av_strcasecmp(cmd, "MaxTime")) {
43324331 get_arg(arg, sizeof(arg), &p);
43334332 if (stream)
43344333 stream->max_time = atof(arg) * 1000;
4335− } else if (!strcasecmp(cmd, "AudioBitRate")) {
4334+ } else if (!av_strcasecmp(cmd, "AudioBitRate")) {
43364335 get_arg(arg, sizeof(arg), &p);
43374336 if (stream)
43384337 audio_enc.bit_rate = lrintf(atof(arg) * 1000);
4339− } else if (!strcasecmp(cmd, "AudioChannels")) {
4338+ } else if (!av_strcasecmp(cmd, "AudioChannels")) {
43404339 get_arg(arg, sizeof(arg), &p);
43414340 if (stream)
43424341 audio_enc.channels = atoi(arg);
4343− } else if (!strcasecmp(cmd, "AudioSampleRate")) {
4342+ } else if (!av_strcasecmp(cmd, "AudioSampleRate")) {
43444343 get_arg(arg, sizeof(arg), &p);
43454344 if (stream)
43464345 audio_enc.sample_rate = atoi(arg);
4347− } else if (!strcasecmp(cmd, "AudioQuality")) {
4346+ } else if (!av_strcasecmp(cmd, "AudioQuality")) {
43484347 get_arg(arg, sizeof(arg), &p);
43494348 if (stream) {
43504349 // audio_enc.quality = atof(arg) * 1000;
43514350 }
4352− } else if (!strcasecmp(cmd, "VideoBitRateRange")) {
4351+ } else if (!av_strcasecmp(cmd, "VideoBitRateRange")) {
43534352 if (stream) {
43544353 int minrate, maxrate;
43554354
@@ -4362,32 +4361,32 @@ static int parse_ffconfig(const char *filename) · 6 unmodified lines
43624361 ERROR("Incorrect format for VideoBitRateRange -- should be <min>-<max>: %s\n", arg);
43634362 }
43644363 }
4365− } else if (!strcasecmp(cmd, "Debug")) {
4364+ } else if (!av_strcasecmp(cmd, "Debug")) {
43664365 if (stream) {
43674366 get_arg(arg, sizeof(arg), &p);
43684367 video_enc.debug = strtol(arg,0,0);
43694368 }
4370− } else if (!strcasecmp(cmd, "Strict")) {
4369+ } else if (!av_strcasecmp(cmd, "Strict")) {
43714370 if (stream) {
43724371 get_arg(arg, sizeof(arg), &p);
43734372 video_enc.strict_std_compliance = atoi(arg);
43744373 }
4375− } else if (!strcasecmp(cmd, "VideoBufferSize")) {
4374+ } else if (!av_strcasecmp(cmd, "VideoBufferSize")) {
43764375 if (stream) {
43774376 get_arg(arg, sizeof(arg), &p);
43784377 video_enc.rc_buffer_size = atoi(arg) * 8*1024;
43794378 }
4380− } else if (!strcasecmp(cmd, "VideoBitRateTolerance")) {
4379+ } else if (!av_strcasecmp(cmd, "VideoBitRateTolerance")) {
43814380 if (stream) {
43824381 get_arg(arg, sizeof(arg), &p);
43834382 video_enc.bit_rate_tolerance = atoi(arg) * 1000;
43844383 }
4385− } else if (!strcasecmp(cmd, "VideoBitRate")) {
4384+ } else if (!av_strcasecmp(cmd, "VideoBitRate")) {
43864385 get_arg(arg, sizeof(arg), &p);
43874386 if (stream) {
43884387 video_enc.bit_rate = atoi(arg) * 1000;
43894388 }
4390− } else if (!strcasecmp(cmd, "VideoSize")) {
4389+ } else if (!av_strcasecmp(cmd, "VideoSize")) {
43914390 get_arg(arg, sizeof(arg), &p);
43924391 if (stream) {
43934392 av_parse_video_size(&video_enc.width, &video_enc.height, arg);
@@ -4396,7 +4395,7 @@ static int parse_ffconfig(const char *filename) · 2 unmodified lines
43964395 ERROR("Image size must be a multiple of 16\n");
43974396 }
43984397 }
4399− } else if (!strcasecmp(cmd, "VideoFrameRate")) {
4398+ } else if (!av_strcasecmp(cmd, "VideoFrameRate")) {
44004399 get_arg(arg, sizeof(arg), &p);
44014400 if (stream) {
44024401 AVRational frame_rate;
@@ -4407,29 +4406,29 @@ static int parse_ffconfig(const char *filename) · 4 unmodified lines
44074406 video_enc.time_base.den = frame_rate.num;
44084407 }
44094408 }
4410− } else if (!strcasecmp(cmd, "VideoGopSize")) {
4409+ } else if (!av_strcasecmp(cmd, "VideoGopSize")) {
44114410 get_arg(arg, sizeof(arg), &p);
44124411 if (stream)
44134412 video_enc.gop_size = atoi(arg);
4414− } else if (!strcasecmp(cmd, "VideoIntraOnly")) {
4413+ } else if (!av_strcasecmp(cmd, "VideoIntraOnly")) {
44154414 if (stream)
44164415 video_enc.gop_size = 1;
4417− } else if (!strcasecmp(cmd, "VideoHighQuality")) {
4416+ } else if (!av_strcasecmp(cmd, "VideoHighQuality")) {
44184417 if (stream)
44194418 video_enc.mb_decision = FF_MB_DECISION_BITS;
4420− } else if (!strcasecmp(cmd, "Video4MotionVector")) {
4419+ } else if (!av_strcasecmp(cmd, "Video4MotionVector")) {
44214420 if (stream) {
44224421 video_enc.mb_decision = FF_MB_DECISION_BITS; //FIXME remove
44234422 video_enc.flags |= CODEC_FLAG_4MV;
44244423 }
4425− } else if (!strcasecmp(cmd, "AVOptionVideo") ||
4426− !strcasecmp(cmd, "AVOptionAudio")) {
4424+ } else if (!av_strcasecmp(cmd, "AVOptionVideo") ||
4425+ !av_strcasecmp(cmd, "AVOptionAudio")) {
44274426 char arg2[1024];
44284427 AVCodecContext *avctx;
44294428 int type;
44304429 get_arg(arg, sizeof(arg), &p);
44314430 get_arg(arg2, sizeof(arg2), &p);
4432− if (!strcasecmp(cmd, "AVOptionVideo")) {
4431+ if (!av_strcasecmp(cmd, "AVOptionVideo")) {
44334432 avctx = &video_enc;
44344433 type = AV_OPT_FLAG_VIDEO_PARAM;
44354434 } else {
@@ -4439,12 +4438,12 @@ static int parse_ffconfig(const char *filename) · 3 unmodified lines
44394438 if (avserver_opt_default(arg, arg2, avctx, type|AV_OPT_FLAG_ENCODING_PARAM)) {
44404439 ERROR("AVOption error: %s %s\n", arg, arg2);
44414440 }
4442− } else if (!strcasecmp(cmd, "AVPresetVideo") ||
4443− !strcasecmp(cmd, "AVPresetAudio")) {
4441+ } else if (!av_strcasecmp(cmd, "AVPresetVideo") ||
4442+ !av_strcasecmp(cmd, "AVPresetAudio")) {
44444443 AVCodecContext *avctx;
44454444 int type;
44464445 get_arg(arg, sizeof(arg), &p);
4447− if (!strcasecmp(cmd, "AVPresetVideo")) {
4446+ if (!av_strcasecmp(cmd, "AVPresetVideo")) {
44484447 avctx = &video_enc;
44494448 video_enc.codec_id = video_id;
44504449 type = AV_OPT_FLAG_VIDEO_PARAM;
@@ -4456,26 +4455,26 @@ static int parse_ffconfig(const char *filename) · 5 unmodified lines
44564455 if (avserver_opt_preset(arg, avctx, type|AV_OPT_FLAG_ENCODING_PARAM, &audio_id, &video_id)) {
44574456 ERROR("AVPreset error: %s\n", arg);
44584457 }
4459− } else if (!strcasecmp(cmd, "VideoTag")) {
4458+ } else if (!av_strcasecmp(cmd, "VideoTag")) {
44604459 get_arg(arg, sizeof(arg), &p);
44614460 if ((strlen(arg) == 4) && stream)
44624461 video_enc.codec_tag = MKTAG(arg[0], arg[1], arg[2], arg[3]);
4463− } else if (!strcasecmp(cmd, "BitExact")) {
4462+ } else if (!av_strcasecmp(cmd, "BitExact")) {
44644463 if (stream)
44654464 video_enc.flags |= CODEC_FLAG_BITEXACT;
4466− } else if (!strcasecmp(cmd, "DctFastint")) {
4465+ } else if (!av_strcasecmp(cmd, "DctFastint")) {
44674466 if (stream)
44684467 video_enc.dct_algo = FF_DCT_FASTINT;
4469− } else if (!strcasecmp(cmd, "IdctSimple")) {
4468+ } else if (!av_strcasecmp(cmd, "IdctSimple")) {
44704469 if (stream)
44714470 video_enc.idct_algo = FF_IDCT_SIMPLE;
4472− } else if (!strcasecmp(cmd, "Qscale")) {
4471+ } else if (!av_strcasecmp(cmd, "Qscale")) {
44734472 get_arg(arg, sizeof(arg), &p);
44744473 if (stream) {
44754474 video_enc.flags |= CODEC_FLAG_QSCALE;
44764475 video_enc.global_quality = FF_QP2LAMBDA * atoi(arg);
44774476 }
4478− } else if (!strcasecmp(cmd, "VideoQDiff")) {
4477+ } else if (!av_strcasecmp(cmd, "VideoQDiff")) {
44794478 get_arg(arg, sizeof(arg), &p);
44804479 if (stream) {
44814480 video_enc.max_qdiff = atoi(arg);
@@ -4483,7 +4482,7 @@ static int parse_ffconfig(const char *filename) · 1 unmodified line
44834482 ERROR("VideoQDiff out of range\n");
44844483 }
44854484 }
4486− } else if (!strcasecmp(cmd, "VideoQMax")) {
4485+ } else if (!av_strcasecmp(cmd, "VideoQMax")) {
44874486 get_arg(arg, sizeof(arg), &p);
44884487 if (stream) {
44894488 video_enc.qmax = atoi(arg);
@@ -4491,7 +4490,7 @@ static int parse_ffconfig(const char *filename) · 1 unmodified line
44914490 ERROR("VideoQMax out of range\n");
44924491 }
44934492 }
4494− } else if (!strcasecmp(cmd, "VideoQMin")) {
4493+ } else if (!av_strcasecmp(cmd, "VideoQMin")) {
44954494 get_arg(arg, sizeof(arg), &p);
44964495 if (stream) {
44974496 video_enc.qmin = atoi(arg);
@@ -4499,39 +4498,39 @@ static int parse_ffconfig(const char *filename) · 1 unmodified line
44994498 ERROR("VideoQMin out of range\n");
45004499 }
45014500 }
4502− } else if (!strcasecmp(cmd, "LumaElim")) {
4501+ } else if (!av_strcasecmp(cmd, "LumaElim")) {
45034502 get_arg(arg, sizeof(arg), &p);
45044503 if (stream)
45054504 video_enc.luma_elim_threshold = atoi(arg);
4506− } else if (!strcasecmp(cmd, "ChromaElim")) {
4505+ } else if (!av_strcasecmp(cmd, "ChromaElim")) {
45074506 get_arg(arg, sizeof(arg), &p);
45084507 if (stream)
45094508 video_enc.chroma_elim_threshold = atoi(arg);
4510− } else if (!strcasecmp(cmd, "LumiMask")) {
4509+ } else if (!av_strcasecmp(cmd, "LumiMask")) {
45114510 get_arg(arg, sizeof(arg), &p);
45124511 if (stream)
45134512 video_enc.lumi_masking = atof(arg);
4514− } else if (!strcasecmp(cmd, "DarkMask")) {
4513+ } else if (!av_strcasecmp(cmd, "DarkMask")) {
45154514 get_arg(arg, sizeof(arg), &p);
45164515 if (stream)
45174516 video_enc.dark_masking = atof(arg);
4518− } else if (!strcasecmp(cmd, "NoVideo")) {
4517+ } else if (!av_strcasecmp(cmd, "NoVideo")) {
45194518 video_id = CODEC_ID_NONE;
4520− } else if (!strcasecmp(cmd, "NoAudio")) {
4519+ } else if (!av_strcasecmp(cmd, "NoAudio")) {
45214520 audio_id = CODEC_ID_NONE;
4522− } else if (!strcasecmp(cmd, "ACL")) {
4521+ } else if (!av_strcasecmp(cmd, "ACL")) {
45234522 parse_acl_row(stream, feed, NULL, p, filename, line_num);
4524− } else if (!strcasecmp(cmd, "DynamicACL")) {
4523+ } else if (!av_strcasecmp(cmd, "DynamicACL")) {
45254524 if (stream) {
45264525 get_arg(stream->dynamic_acl, sizeof(stream->dynamic_acl), &p);
45274526 }
4528− } else if (!strcasecmp(cmd, "RTSPOption")) {
4527+ } else if (!av_strcasecmp(cmd, "RTSPOption")) {
45294528 get_arg(arg, sizeof(arg), &p);
45304529 if (stream) {
45314530 av_freep(&stream->rtsp_option);
45324531 stream->rtsp_option = av_strdup(arg);
45334532 }
4534− } else if (!strcasecmp(cmd, "MulticastAddress")) {
4533+ } else if (!av_strcasecmp(cmd, "MulticastAddress")) {
45354534 get_arg(arg, sizeof(arg), &p);
45364535 if (stream) {
45374536 if (resolve_host(&stream->multicast_ip, arg) != 0) {
@@ -4540,18 +4539,18 @@ static int parse_ffconfig(const char *filename) · 2 unmodified lines
45404539 stream->is_multicast = 1;
45414540 stream->loop = 1; /* default is looping */
45424541 }
4543− } else if (!strcasecmp(cmd, "MulticastPort")) {
4542+ } else if (!av_strcasecmp(cmd, "MulticastPort")) {
45444543 get_arg(arg, sizeof(arg), &p);
45454544 if (stream)
45464545 stream->multicast_port = atoi(arg);
4547− } else if (!strcasecmp(cmd, "MulticastTTL")) {
4546+ } else if (!av_strcasecmp(cmd, "MulticastTTL")) {
45484547 get_arg(arg, sizeof(arg), &p);
45494548 if (stream)
45504549 stream->multicast_ttl = atoi(arg);
4551− } else if (!strcasecmp(cmd, "NoLoop")) {
4550+ } else if (!av_strcasecmp(cmd, "NoLoop")) {
45524551 if (stream)
45534552 stream->loop = 0;
4554− } else if (!strcasecmp(cmd, "</Stream>")) {
4553+ } else if (!av_strcasecmp(cmd, "</Stream>")) {
45554554 if (!stream) {
45564555 ERROR("No corresponding <Stream> for </Stream>\n");
45574556 } else {
@@ -4569,7 +4568,7 @@ static int parse_ffconfig(const char *filename) · 11 unmodified lines
45694568 }
45704569 stream = NULL;
45714570 }
4572− } else if (!strcasecmp(cmd, "<Redirect")) {
4571+ } else if (!av_strcasecmp(cmd, "<Redirect")) {
45734572 /*********************************************/
45744573 char *q;
45754574 if (stream || feed || redirect) {
@@ -4585,10 +4584,10 @@ static int parse_ffconfig(const char *filename) · 9 unmodified lines
45854584 *q = '\0';
45864585 redirect->stream_type = STREAM_TYPE_REDIRECT;
45874586 }
4588− } else if (!strcasecmp(cmd, "URL")) {
4587+ } else if (!av_strcasecmp(cmd, "URL")) {
45894588 if (redirect)
45904589 get_arg(redirect->feed_filename, sizeof(redirect->feed_filename), &p);
4591− } else if (!strcasecmp(cmd, "</Redirect>")) {
4590+ } else if (!av_strcasecmp(cmd, "</Redirect>")) {
45924591 if (!redirect) {
45934592 ERROR("No corresponding <Redirect> for </Redirect>\n");
45944593 } else {
@@ -4597,7 +4596,7 @@ static int parse_ffconfig(const char *filename) · 2 unmodified lines
45974596 }
45984597 redirect = NULL;
45994598 }
4600− } else if (!strcasecmp(cmd, "LoadModule")) {
4599+ } else if (!av_strcasecmp(cmd, "LoadModule")) {
46014600 get_arg(arg, sizeof(arg), &p);
46024601 #if HAVE_DLOPEN
46034602 load_module(arg);
libavdevice/v4l2.c+2−2
@@ -42,12 +42,12 @@ · 41 unmodified lines
4242 #include <linux/videodev2.h>
4343 #endif
4444 #include <time.h>
45−#include <strings.h>
4645 #include "libavutil/imgutils.h"
4746 #include "libavutil/log.h"
4847 #include "libavutil/opt.h"
4948 #include "libavutil/parseutils.h"
5049 #include "libavutil/pixdesc.h"
50+#include "libavutil/avstring.h"
5151
5252 static const int desired_video_buffers = 256;
5353
@@ -493,7 +493,7 @@ static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap) · 439 unmodified lines
493493 return AVERROR(EIO);
494494 }
495495
496− if (!strcasecmp(standard.name, s->standard)) {
496+ if (!av_strcasecmp(standard.name, s->standard)) {
497497 break;
498498 }
499499 }
libavformat/avidec.c+2−2
@@ -19,11 +19,11 @@ · 18 unmodified lines
1919 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2020 */
2121
22−#include <strings.h>
2322 #include "libavutil/intreadwrite.h"
2423 #include "libavutil/mathematics.h"
2524 #include "libavutil/bswap.h"
2625 #include "libavutil/dict.h"
26+#include "libavutil/avstring.h"
2727 #include "avformat.h"
2828 #include "avi.h"
2929 #include "dv.h"
@@ -281,7 +281,7 @@ static void avi_metadata_creation_time(AVDictionary **metadata, char *date) · 251 unmodified lines
281281 if (sscanf(date, "%*3s%*[ ]%3s%*[ ]%2d%*[ ]%8s%*[ ]%4d",
282282 month, &day, time, &year) == 4) {
283283 for (i=0; i<12; i++)
284− if (!strcasecmp(month, months[i])) {
284+ if (!av_strcasecmp(month, months[i])) {
285285 snprintf(buffer, sizeof(buffer), "%.4d-%.2d-%.2d %s",
286286 year, i+1, day, time);
287287 av_dict_set(metadata, "creation_time", buffer, 0);
libavformat/http.c+8−9
@@ -22,7 +22,6 @@ · 21 unmodified lines
2222 #include "libavutil/avstring.h"
2323 #include "avformat.h"
2424 #include <unistd.h>
25−#include <strings.h>
2625 #include "internal.h"
2726 #include "network.h"
2827 #include "http.h"
@@ -251,12 +250,12 @@ static int process_line(URLContext *h, char *line, int line_count, · 222 unmodified lines
251250 p++;
252251 while (isspace(*p))
253252 p++;
254− if (!strcasecmp(tag, "Location")) {
253+ if (!av_strcasecmp(tag, "Location")) {
255254 strcpy(s->location, p);
256255 *new_location = 1;
257− } else if (!strcasecmp (tag, "Content-Length") && s->filesize == -1) {
256+ } else if (!av_strcasecmp (tag, "Content-Length") && s->filesize == -1) {
258257 s->filesize = atoll(p);
259− } else if (!strcasecmp (tag, "Content-Range")) {
258+ } else if (!av_strcasecmp (tag, "Content-Range")) {
260259 /* "bytes $from-$to/$document_size" */
261260 const char *slash;
262261 if (!strncmp (p, "bytes ", 6)) {
@@ -266,16 +265,16 @@ static int process_line(URLContext *h, char *line, int line_count, · 3 unmodified lines
266265 s->filesize = atoll(slash+1);
267266 }
268267 h->is_streamed = 0; /* we _can_ in fact seek */
269− } else if (!strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5)) {
268+ } else if (!av_strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5)) {
270269 h->is_streamed = 0;
271− } else if (!strcasecmp (tag, "Transfer-Encoding") && !strncasecmp(p, "chunked", 7)) {
270+ } else if (!av_strcasecmp (tag, "Transfer-Encoding") && !av_strncasecmp(p, "chunked", 7)) {
272271 s->filesize = -1;
273272 s->chunksize = 0;
274− } else if (!strcasecmp (tag, "WWW-Authenticate")) {
273+ } else if (!av_strcasecmp (tag, "WWW-Authenticate")) {
275274 ff_http_auth_handle_header(&s->auth_state, tag, p);
276− } else if (!strcasecmp (tag, "Authentication-Info")) {
275+ } else if (!av_strcasecmp (tag, "Authentication-Info")) {
277276 ff_http_auth_handle_header(&s->auth_state, tag, p);
278− } else if (!strcasecmp (tag, "Connection")) {
277+ } else if (!av_strcasecmp (tag, "Connection")) {
279278 if (!strcmp(p, "close"))
280279 s->willclose = 1;
281280 }
libavformat/img2.c+1−2
@@ -29,7 +29,6 @@ · 28 unmodified lines
2929 #include "avformat.h"
3030 #include "avio_internal.h"
3131 #include "internal.h"
32−#include <strings.h>
3332
3433 typedef struct {
3534 const AVClass *class; /**< Class for private options. */
@@ -121,7 +120,7 @@ static enum CodecID av_str2id(const IdStrMap *tags, const char *str) · 85 unmodified lines
121120 str++;
122121
123122 while (tags->id) {
124− if (!strcasecmp(str, tags->str))
123+ if (!av_strcasecmp(str, tags->str))
125124 return tags->id;
126125
127126 tags++;
libavformat/matroskaenc.c+2−2
@@ -33,9 +33,9 @@ · 32 unmodified lines
3333 #include "libavutil/random_seed.h"
3434 #include "libavutil/lfg.h"
3535 #include "libavutil/dict.h"
36+#include "libavutil/avstring.h"
3637 #include "libavcodec/xiph.h"
3738 #include "libavcodec/mpeg4audio.h"
38−#include <strings.h>
3939
4040 typedef struct ebml_master {
4141 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 · 718 unmodified lines
760760 end_ebml_master(s->pb, targets);
761761
762762 while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX)))
763− if (strcasecmp(t->key, "title"))
763+ if (av_strcasecmp(t->key, "title"))
764764 mkv_write_simpletag(s->pb, t);
765765
766766 end_ebml_master(s->pb, tag);
libavformat/metadata.c+3−3
@@ -18,10 +18,10 @@ · 17 unmodified lines
1818 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1919 */
2020
21−#include <strings.h>
2221 #include "avformat.h"
2322 #include "metadata.h"
2423 #include "libavutil/dict.h"
24+#include "libavutil/avstring.h"
2525
2626 #if FF_API_OLD_METADATA2
2727 AVDictionaryEntry *
@@ -69,13 +69,13 @@ void ff_metadata_conv(AVDictionary **pm, const AVMetadataConv *d_conv, · 41 unmodified lines
6969 key = mtag->key;
7070 if (s_conv)
7171 for (sc=s_conv; sc->native; sc++)
72− if (!strcasecmp(key, sc->native)) {
72+ if (!av_strcasecmp(key, sc->native)) {
7373 key = sc->generic;
7474 break;
7575 }
7676 if (d_conv)
7777 for (dc=d_conv; dc->native; dc++)
78− if (!strcasecmp(key, dc->generic)) {
78+ if (!av_strcasecmp(key, dc->generic)) {
7979 key = dc->native;
8080 break;
8181 }
libavformat/mp3enc.c+1−2
@@ -19,7 +19,6 @@ · 18 unmodified lines
1919 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2020 */
2121
22−#include <strings.h>
2322 #include "avformat.h"
2423 #include "avio_internal.h"
2524 #include "id3v1.h"
@@ -64,7 +63,7 @@ static int id3v1_create_tag(AVFormatContext *s, uint8_t *buf) · 38 unmodified lines
6463 buf[127] = 0xFF; /* default to unknown genre */
6564 if ((tag = av_dict_get(s->metadata, "TCON", NULL, 0))) { //genre
6665 for(i = 0; i <= ID3v1_GENRE_MAX; i++) {
67− if (!strcasecmp(tag->value, ff_id3v1_genre_str[i])) {
66+ if (!av_strcasecmp(tag->value, ff_id3v1_genre_str[i])) {
6867 buf[127] = i;
6968 count++;
7069 break;
libavformat/nutdec.c+2−3
@@ -20,7 +20,6 @@ · 19 unmodified lines
2020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2121 */
2222
23−#include <strings.h>
2423 #include "libavutil/avstring.h"
2524 #include "libavutil/bswap.h"
2625 #include "libavutil/dict.h"
@@ -459,8 +458,8 @@ static int decode_info_header(NUTContext *nut){ · 432 unmodified lines
459458 set_disposition_bits(s, str_value, stream_id_plus1 - 1);
460459 continue;
461460 }
462− if(metadata && strcasecmp(name,"Uses")
463− && strcasecmp(name,"Depends") && strcasecmp(name,"Replaces"))
461+ if(metadata && av_strcasecmp(name,"Uses")
462+ && av_strcasecmp(name,"Depends") && av_strcasecmp(name,"Replaces"))
464463 av_dict_set(metadata, name, str_value, 0);
465464 }
466465 }
libavformat/rtpdec.c+2−2
@@ -20,13 +20,13 @@ · 19 unmodified lines
2020 */
2121
2222 #include "libavutil/mathematics.h"
23+#include "libavutil/avstring.h"
2324 #include "libavcodec/get_bits.h"
2425 #include "avformat.h"
2526 #include "mpegts.h"
2627 #include "url.h"
2728
2829 #include <unistd.h>
29−#include <strings.h>
3030 #include "network.h"
3131
3232 #include "rtpdec.h"
@@ -91,7 +91,7 @@ RTPDynamicProtocolHandler *ff_rtp_handler_find_by_name(const char *name, · 58 unmodified lines
9191 RTPDynamicProtocolHandler *handler;
9292 for (handler = RTPFirstDynamicPayloadHandler;
9393 handler; handler = handler->next)
94− if (!strcasecmp(name, handler->enc_name) &&
94+ if (!av_strcasecmp(name, handler->enc_name) &&
9595 codec_type == handler->codec_type)
9696 return handler;
9797 return NULL;
libavformat/rtpdec_mpeg4.c+1−2
@@ -31,7 +31,6 @@ · 30 unmodified lines
3131 #include "internal.h"
3232 #include "libavutil/avstring.h"
3333 #include "libavcodec/get_bits.h"
34−#include <strings.h>
3534
3635 /** Structure listing useful vars to parse RTP packet payload*/
3736 struct PayloadContext
@@ -206,7 +205,7 @@ static int parse_fmtp(AVStream *stream, PayloadContext *data, · 168 unmodified lines
206205 if (codec->codec_id == CODEC_ID_AAC) {
207206 /* Looking for a known attribute */
208207 for (i = 0; attr_names[i].str; ++i) {
209− if (!strcasecmp(attr, attr_names[i].str)) {
208+ if (!av_strcasecmp(attr, attr_names[i].str)) {
210209 if (attr_names[i].type == ATTR_NAME_TYPE_INT) {
211210 *(int *)((char *)data+
212211 attr_names[i].offset) = atoi(value);
libavformat/rtsp.c+5−6
@@ -34,7 +34,6 @@ · 33 unmodified lines
3434 #if HAVE_POLL_H
3535 #include <poll.h>
3636 #endif
37−#include <strings.h>
3837 #include "internal.h"
3938 #include "network.h"
4039 #include "os_support.h"
@@ -661,7 +660,7 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p) · 620 unmodified lines
661660
662661 get_word_sep(transport_protocol, sizeof(transport_protocol),
663662 "/", &p);
664− if (!strcasecmp (transport_protocol, "rtp")) {
663+ if (!av_strcasecmp (transport_protocol, "rtp")) {
665664 get_word_sep(profile, sizeof(profile), "/;,", &p);
666665 lower_transport[0] = '\0';
667666 /* rtp/avp/<protocol> */
@@ -670,14 +669,14 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p) · 2 unmodified lines
670669 ";,", &p);
671670 }
672671 th->transport = RTSP_TRANSPORT_RTP;
673− } else if (!strcasecmp (transport_protocol, "x-pn-tng") ||
674− !strcasecmp (transport_protocol, "x-real-rdt")) {
672+ } else if (!av_strcasecmp (transport_protocol, "x-pn-tng") ||
673+ !av_strcasecmp (transport_protocol, "x-real-rdt")) {
675674 /* x-pn-tng/<protocol> */
676675 get_word_sep(lower_transport, sizeof(lower_transport), "/;,", &p);
677676 profile[0] = '\0';
678677 th->transport = RTSP_TRANSPORT_RDT;
679678 }
680− if (!strcasecmp(lower_transport, "TCP"))
679+ if (!av_strcasecmp(lower_transport, "TCP"))
681680 th->lower_transport = RTSP_LOWER_TRANSPORT_TCP;
682681 else
683682 th->lower_transport = RTSP_LOWER_TRANSPORT_UDP;
@@ -1556,7 +1555,7 @@ redirect: · 872 unmodified lines
15561555 if (rt->server_type != RTSP_SERVER_REAL && reply->real_challenge[0]) {
15571556 rt->server_type = RTSP_SERVER_REAL;
15581557 continue;
1559− } else if (!strncasecmp(reply->server, "WMServer/", 9)) {
1558+ } else if (!av_strncasecmp(reply->server, "WMServer/", 9)) {
15601559 rt->server_type = RTSP_SERVER_WMS;
15611560 } else if (rt->server_type == RTSP_SERVER_REAL)
15621561 strcpy(real_challenge, reply->real_challenge);
libavformat/utils.c+3−4
@@ -37,7 +37,6 @@ · 36 unmodified lines
3737 #include "url.h"
3838 #include <sys/time.h>
3939 #include <time.h>
40−#include <strings.h>
4140 #include <stdarg.h>
4241 #if CONFIG_NETWORK
4342 #include "network.h"
@@ -169,7 +168,7 @@ int av_match_ext(const char *filename, const char *extensions) · 125 unmodified lines
169168 while (*p != '\0' && *p != ',' && q-ext1<sizeof(ext1)-1)
170169 *q++ = *p++;
171170 *q = '\0';
172− if (!strcasecmp(ext1, ext))
171+ if (!av_strcasecmp(ext1, ext))
173172 return 1;
174173 if (*p == '\0')
175174 break;
@@ -190,11 +189,11 @@ static int match_format(const char *name, const char *names) · 14 unmodified lines
190189 namelen = strlen(name);
191190 while ((p = strchr(names, ','))) {
192191 len = FFMAX(p - names, namelen);
193− if (!strncasecmp(name, names, len))
192+ if (!av_strncasecmp(name, names, len))
194193 return 1;
195194 names = p+1;
196195 }
197− return !strcasecmp(name, names);
196+ return !av_strcasecmp(name, names);
198197 }
199198
200199 AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
libavutil/parseutils.c+3−4
@@ -21,7 +21,6 @@ · 20 unmodified lines
2121 * misc parsing utilities
2222 */
2323
24−#include <strings.h>
2524 #include <sys/time.h>
2625 #include <time.h>
2726
@@ -294,7 +293,7 @@ static ColorEntry color_table[] = { · 266 unmodified lines
294293
295294 static int color_table_compare(const void *lhs, const void *rhs)
296295 {
297− return strcasecmp(lhs, ((const ColorEntry *)rhs)->name);
296+ return av_strcasecmp(lhs, ((const ColorEntry *)rhs)->name);
298297 }
299298
300299 #define ALPHA_SEP '@'
@@ -320,7 +319,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, · 19 unmodified lines
320319 len = strlen(color_string2);
321320 rgba_color[3] = 255;
322321
323− if (!strcasecmp(color_string2, "random") || !strcasecmp(color_string2, "bikeshed")) {
322+ if (!av_strcasecmp(color_string2, "random") || !av_strcasecmp(color_string2, "bikeshed")) {
324323 int rgba = av_get_random_seed();
325324 rgba_color[0] = rgba >> 24;
326325 rgba_color[1] = rgba >> 16;
@@ -515,7 +514,7 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration) · 188 unmodified lines
515514 p = timestr;
516515 q = NULL;
517516 if (!duration) {
518− if (!strncasecmp(timestr, "now", len)) {
517+ if (!av_strncasecmp(timestr, "now", len)) {
519518 *timeval = (int64_t) now * 1000000;
520519 return 0;
521520 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t