History

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.

Reimar Döffinger committed 15 years ago

Commit 96949da1 parent 475fb6718 files · +93 −55Browse files

Unified · Split

18 files
  1. doc/APIchanges +3 −0
  2. libavdevice/v4l2.c +2 −2
  3. libavfilter/libmpcodecs/vf_palette.c +10 −10
  4. libavformat/avidec.c +2 −2
  5. libavformat/http.c +8 −9
  6. libavformat/img2.c +3 −4
  7. libavformat/matroskaenc.c +2 −2
  8. libavformat/metadata.c +3 −3
  9. libavformat/mp3enc.c +1 −2
  10. libavformat/nutdec.c +2 −3
  11. libavformat/rtpdec.c +2 −2
  12. libavformat/rtpdec_mpeg4.c +1 −2
  13. libavformat/rtsp.c +5 −6
  14. libavformat/utils.c +3 −4
  15. libavutil/avstring.c +27 −0
  16. libavutil/avstring.h +12 −0
  17. libavutil/internal.h +4 −0
  18. libavutil/parseutils.c +3 −4
doc/APIchanges+3−0
@@ -13,6 +13,9 @@ libavutil: 2011-04-18 · 12 unmodified lines
1313
1414 API changes, most recent first:
1515
16+2011-11-03 - xxxxxxx - lavu 51.23.0
17+ Add av_strcasecmp() and av_strncasecmp() to avstring.h.
18+
1619 2011-10-20 - b35e9e1 - lavu 51.22.0
1720 Add av_strtok() to avstring.h.
1821
libavdevice/v4l2.c+2−2
@@ -44,13 +44,13 @@ · 43 unmodified lines
4444 #include <linux/videodev2.h>
4545 #endif
4646 #include <time.h>
47−#include <strings.h>
4847 #include "libavutil/imgutils.h"
4948 #include "libavutil/log.h"
5049 #include "libavutil/opt.h"
5150 #include "avdevice.h"
5251 #include "libavutil/parseutils.h"
5352 #include "libavutil/pixdesc.h"
53+#include "libavutil/avstring.h"
5454
5555 static const int desired_video_buffers = 256;
5656
@@ -470,7 +470,7 @@ static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap) · 413 unmodified lines
470470 for (i = 0;; i++) {
471471 standard.index = i;
472472 ret = ioctl(s->fd, VIDIOC_ENUMSTD, &standard);
473− if (ret < 0 || !strcasecmp(standard.name, s->standard))
473+ if (ret < 0 || !av_strcasecmp(standard.name, s->standard))
474474 break;
475475 }
476476 if (ret < 0) {
libavfilter/libmpcodecs/vf_palette.c+10−10
@@ -16,10 +16,8 @@ · 15 unmodified lines
1616 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1717 */
1818
19−#define _BSD_SOURCE //strcasecmp
2019 #include <stdio.h>
2120 #include <stdlib.h>
22−#include <string.h>
2321 #include <inttypes.h>
2422
2523 #include "config.h"
@@ -33,6 +31,8 @@ · 7 unmodified lines
3331
3432 #include "libswscale/swscale.h"
3533
34+#include "libavutil/avstring.h"
35+
3636 //===========================================================================//
3737
3838 // commented out 16 and 15 bit output support, because the conversion
@@ -208,14 +208,14 @@ static int vf_open(vf_instance_t *vf, char *args){ · 169 unmodified lines
208208 for(i=0;i<256;i++) gray_pal[i]=0x01010101*i;
209209 if (args)
210210 {
211− if (!strcasecmp(args,"rgb15")) vf->priv->fmt=IMGFMT_RGB15; else
212− if (!strcasecmp(args,"rgb16")) vf->priv->fmt=IMGFMT_RGB16; else
213− if (!strcasecmp(args,"rgb24")) vf->priv->fmt=IMGFMT_RGB24; else
214− if (!strcasecmp(args,"rgb32")) vf->priv->fmt=IMGFMT_RGB32; else
215− if (!strcasecmp(args,"bgr15")) vf->priv->fmt=IMGFMT_BGR15; else
216− if (!strcasecmp(args,"bgr16")) vf->priv->fmt=IMGFMT_BGR16; else
217− if (!strcasecmp(args,"bgr24")) vf->priv->fmt=IMGFMT_BGR24; else
218− if (!strcasecmp(args,"bgr32")) vf->priv->fmt=IMGFMT_BGR32; else
211+ if (!av_strcasecmp(args,"rgb15")) vf->priv->fmt=IMGFMT_RGB15; else
212+ if (!av_strcasecmp(args,"rgb16")) vf->priv->fmt=IMGFMT_RGB16; else
213+ if (!av_strcasecmp(args,"rgb24")) vf->priv->fmt=IMGFMT_RGB24; else
214+ if (!av_strcasecmp(args,"rgb32")) vf->priv->fmt=IMGFMT_RGB32; else
215+ if (!av_strcasecmp(args,"bgr15")) vf->priv->fmt=IMGFMT_BGR15; else
216+ if (!av_strcasecmp(args,"bgr16")) vf->priv->fmt=IMGFMT_BGR16; else
217+ if (!av_strcasecmp(args,"bgr24")) vf->priv->fmt=IMGFMT_BGR24; else
218+ if (!av_strcasecmp(args,"bgr32")) vf->priv->fmt=IMGFMT_BGR32; else
219219 {
220220 mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args);
221221 return 0;
libavformat/avidec.c+2−2
@@ -19,12 +19,12 @@ · 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/opt.h"
2726 #include "libavutil/dict.h"
27+#include "libavutil/avstring.h"
2828 #include "avformat.h"
2929 #include "avi.h"
3030 #include "dv.h"
@@ -307,7 +307,7 @@ static void avi_metadata_creation_time(AVDictionary **metadata, char *date) · 276 unmodified lines
307307 if (sscanf(date, "%*3s%*[ ]%3s%*[ ]%2d%*[ ]%8s%*[ ]%4d",
308308 month, &day, time, &year) == 4) {
309309 for (i=0; i<12; i++)
310− if (!strcasecmp(month, months[i])) {
310+ if (!av_strcasecmp(month, months[i])) {
311311 snprintf(buffer, sizeof(buffer), "%.4d-%.2d-%.2d %s",
312312 year, i+1, day, time);
313313 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"
@@ -250,12 +249,12 @@ static int process_line(URLContext *h, char *line, int line_count, · 221 unmodified lines
250249 p++;
251250 while (isspace(*p))
252251 p++;
253− if (!strcasecmp(tag, "Location")) {
252+ if (!av_strcasecmp(tag, "Location")) {
254253 strcpy(s->location, p);
255254 *new_location = 1;
256− } else if (!strcasecmp (tag, "Content-Length") && s->filesize == -1) {
255+ } else if (!av_strcasecmp (tag, "Content-Length") && s->filesize == -1) {
257256 s->filesize = atoll(p);
258− } else if (!strcasecmp (tag, "Content-Range")) {
257+ } else if (!av_strcasecmp (tag, "Content-Range")) {
259258 /* "bytes $from-$to/$document_size" */
260259 const char *slash;
261260 if (!strncmp (p, "bytes ", 6)) {
@@ -265,16 +264,16 @@ static int process_line(URLContext *h, char *line, int line_count, · 3 unmodified lines
265264 s->filesize = atoll(slash+1);
266265 }
267266 h->is_streamed = 0; /* we _can_ in fact seek */
268− } else if (!strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5)) {
267+ } else if (!av_strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5)) {
269268 h->is_streamed = 0;
270− } else if (!strcasecmp (tag, "Transfer-Encoding") && !strncasecmp(p, "chunked", 7)) {
269+ } else if (!av_strcasecmp (tag, "Transfer-Encoding") && !av_strncasecmp(p, "chunked", 7)) {
271270 s->filesize = -1;
272271 s->chunksize = 0;
273− } else if (!strcasecmp (tag, "WWW-Authenticate")) {
272+ } else if (!av_strcasecmp (tag, "WWW-Authenticate")) {
274273 ff_http_auth_handle_header(&s->auth_state, tag, p);
275− } else if (!strcasecmp (tag, "Authentication-Info")) {
274+ } else if (!av_strcasecmp (tag, "Authentication-Info")) {
276275 ff_http_auth_handle_header(&s->auth_state, tag, p);
277− } else if (!strcasecmp (tag, "Connection")) {
276+ } else if (!av_strcasecmp (tag, "Connection")) {
278277 if (!strcmp(p, "close"))
279278 s->willclose = 1;
280279 }
libavformat/img2.c+3−4
@@ -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. */
@@ -125,7 +124,7 @@ static enum CodecID av_str2id(const IdStrMap *tags, const char *str) · 89 unmodified lines
125124 str++;
126125
127126 while (tags->id) {
128− if (!strcasecmp(str, tags->str))
127+ if (!av_strcasecmp(str, tags->str))
129128 return tags->id;
130129
131130 tags++;
@@ -281,7 +280,7 @@ static int read_header(AVFormatContext *s1, AVFormatParameters *ap) · 149 unmodified lines
281280 st->codec->codec_id = s1->audio_codec_id;
282281 }else{
283282 const char *str= strrchr(s->path, '.');
284− s->split_planes = str && !strcasecmp(str + 1, "y");
283+ s->split_planes = str && !av_strcasecmp(str + 1, "y");
285284 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
286285 st->codec->codec_id = av_str2id(img_tags, s->path);
287286 }
@@ -377,7 +376,7 @@ static int write_header(AVFormatContext *s) · 89 unmodified lines
377376 img->is_pipe = 1;
378377
379378 str = strrchr(img->path, '.');
380− img->split_planes = str && !strcasecmp(str + 1, "y");
379+ img->split_planes = str && !av_strcasecmp(str + 1, "y");
381380 return 0;
382381 }
383382
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
@@ -767,7 +767,7 @@ static int mkv_write_tag(AVFormatContext *s, AVDictionary *m, unsigned int eleme · 725 unmodified lines
767767 end_ebml_master(s->pb, targets);
768768
769769 while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX)))
770− if (strcasecmp(t->key, "title") && strcasecmp(t->key, "stereo_mode"))
770+ if (av_strcasecmp(t->key, "title") && av_strcasecmp(t->key, "stereo_mode"))
771771 mkv_write_simpletag(s->pb, t);
772772
773773 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"
@@ -69,7 +68,7 @@ static int id3v1_create_tag(AVFormatContext *s, uint8_t *buf) · 43 unmodified lines
6968 buf[127] = 0xFF; /* default to unknown genre */
7069 if ((tag = av_dict_get(s->metadata, "TCON", NULL, 0))) { //genre
7170 for(i = 0; i <= ID3v1_GENRE_MAX; i++) {
72− if (!strcasecmp(tag->value, ff_id3v1_genre_str[i])) {
71+ if (!av_strcasecmp(tag->value, ff_id3v1_genre_str[i])) {
7372 buf[127] = i;
7473 count++;
7574 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
@@ -33,7 +33,6 @@ · 32 unmodified lines
3333 #if HAVE_POLL_H
3434 #include <poll.h>
3535 #endif
36−#include <strings.h>
3736 #include "internal.h"
3837 #include "network.h"
3938 #include "os_support.h"
@@ -660,7 +659,7 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p) · 620 unmodified lines
660659
661660 get_word_sep(transport_protocol, sizeof(transport_protocol),
662661 "/", &p);
663− if (!strcasecmp (transport_protocol, "rtp")) {
662+ if (!av_strcasecmp (transport_protocol, "rtp")) {
664663 get_word_sep(profile, sizeof(profile), "/;,", &p);
665664 lower_transport[0] = '\0';
666665 /* rtp/avp/<protocol> */
@@ -669,14 +668,14 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p) · 2 unmodified lines
669668 ";,", &p);
670669 }
671670 th->transport = RTSP_TRANSPORT_RTP;
672− } else if (!strcasecmp (transport_protocol, "x-pn-tng") ||
673− !strcasecmp (transport_protocol, "x-real-rdt")) {
671+ } else if (!av_strcasecmp (transport_protocol, "x-pn-tng") ||
672+ !av_strcasecmp (transport_protocol, "x-real-rdt")) {
674673 /* x-pn-tng/<protocol> */
675674 get_word_sep(lower_transport, sizeof(lower_transport), "/;,", &p);
676675 profile[0] = '\0';
677676 th->transport = RTSP_TRANSPORT_RDT;
678677 }
679− if (!strcasecmp(lower_transport, "TCP"))
678+ if (!av_strcasecmp(lower_transport, "TCP"))
680679 th->lower_transport = RTSP_LOWER_TRANSPORT_TCP;
681680 else
682681 th->lower_transport = RTSP_LOWER_TRANSPORT_UDP;
@@ -1555,7 +1554,7 @@ redirect: · 872 unmodified lines
15551554 if (rt->server_type != RTSP_SERVER_REAL && reply->real_challenge[0]) {
15561555 rt->server_type = RTSP_SERVER_REAL;
15571556 continue;
1558− } else if (!strncasecmp(reply->server, "WMServer/", 9)) {
1557+ } else if (!av_strncasecmp(reply->server, "WMServer/", 9)) {
15591558 rt->server_type = RTSP_SERVER_WMS;
15601559 } else if (rt->server_type == RTSP_SERVER_REAL)
15611560 strcpy(real_challenge, reply->real_challenge);
libavformat/utils.c+3−4
@@ -38,7 +38,6 @@ · 37 unmodified lines
3838 #include "url.h"
3939 #include <sys/time.h>
4040 #include <time.h>
41−#include <strings.h>
4241 #include <stdarg.h>
4342 #if CONFIG_NETWORK
4443 #include "network.h"
@@ -170,7 +169,7 @@ int av_match_ext(const char *filename, const char *extensions) · 125 unmodified lines
170169 while (*p != '\0' && *p != ',' && q-ext1<sizeof(ext1)-1)
171170 *q++ = *p++;
172171 *q = '\0';
173− if (!strcasecmp(ext1, ext))
172+ if (!av_strcasecmp(ext1, ext))
174173 return 1;
175174 if (*p == '\0')
176175 break;
@@ -191,11 +190,11 @@ static int match_format(const char *name, const char *names) · 14 unmodified lines
191190 namelen = strlen(name);
192191 while ((p = strchr(names, ','))) {
193192 len = FFMAX(p - names, namelen);
194− if (!strncasecmp(name, names, len))
193+ if (!av_strncasecmp(name, names, len))
195194 return 1;
196195 names = p+1;
197196 }
198− return !strcasecmp(name, names);
197+ return !av_strcasecmp(name, names);
199198 }
200199
201200 AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
libavutil/avstring.c+27−0
@@ -189,6 +189,33 @@ char *av_strtok(char *s, const char *delim, char **saveptr) · 188 unmodified lines
189189 return tok;
190190 }
191191
192+#define TOUPPER(c) do { if (c >= 'a' && c <= 'z') c -= 'a' - 'A'; } while (0)
193+
194+int av_strcasecmp(const char *a, const char *b)
195+{
196+ uint8_t c1, c2;
197+ do {
198+ c1 = *a++;
199+ c2 = *b++;
200+ TOUPPER(c1);
201+ TOUPPER(c2);
202+ } while (c1 && c1 == c2);
203+ return c1 - c2;
204+}
205+
206+int av_strncasecmp(const char *a, const char *b, size_t n)
207+{
208+ const char *end = a + n;
209+ uint8_t c1, c2;
210+ do {
211+ c1 = *a++;
212+ c2 = *b++;
213+ TOUPPER(c1);
214+ TOUPPER(c2);
215+ } while (a < end && c1 && c1 == c2);
216+ return c1 - c2;
217+}
218+
192219 #ifdef TEST
193220
194221 #undef printf
libavutil/avstring.h+12−0
@@ -165,4 +165,16 @@ char *av_get_token(const char **buf, const char *term); · 164 unmodified lines
165165 */
166166 char *av_strtok(char *s, const char *delim, char **saveptr);
167167
168+/**
169+ * Locale independent case-insensitive compare.
170+ * Note: This means only ASCII-range characters are case-insensitive
171+ */
172+int av_strcasecmp(const char *a, const char *b);
173+
174+/**
175+ * Locale independent case-insensitive compare.
176+ * Note: This means only ASCII-range characters are case-insensitive
177+ */
178+int av_strncasecmp(const char *a, const char *b, size_t n);
179+
168180 #endif /* AVUTIL_AVSTRING_H */
libavutil/internal.h+4−0
@@ -156,6 +156,10 @@ struct AVDictionary { · 155 unmodified lines
156156 #define puts please_use_av_log_instead_of_puts
157157 #undef perror
158158 #define perror please_use_av_log_instead_of_perror
159+#undef strcasecmp
160+#define strcasecmp please_use_av_strcasecmp
161+#undef strncasecmp
162+#define strncasecmp please_use_av_strncasecmp
159163
160164 #define FF_ALLOC_OR_GOTO(ctx, p, size, label)\
161165 {\
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;
@@ -525,7 +524,7 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration) · 198 unmodified lines
525524 p = timestr;
526525 q = NULL;
527526 if (!duration) {
528− if (!strncasecmp(timestr, "now", len)) {
527+ if (!av_strncasecmp(timestr, "now", len)) {
529528 *timeval = (int64_t) now * 1000000;
530529 return 0;
531530 }

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