[MPlayer-cvslog] r38237 - trunk/codec-cfg.c

reimar subversion at mplayerhq.hu
Sat Jan 23 21:05:29 EET 2021


Author: reimar
Date: Sat Jan 23 21:05:29 2021
New Revision: 38237

Log:
codec-cfg.c: Also switch to av_strcasecmp.

Except when compiling stand-alone, a libavutil
dependency would complicate things when cross-compiling,
and the locale issue wth strcasecmp is less of a problem
when compiling it as a small stand-alone utility.

Modified:
   trunk/codec-cfg.c

Modified: trunk/codec-cfg.c
==============================================================================
--- trunk/codec-cfg.c	Sat Jan 23 20:54:46 2021	(r38236)
+++ trunk/codec-cfg.c	Sat Jan 23 21:05:29 2021	(r38237)
@@ -40,7 +40,6 @@
 #include <ctype.h>
 #include <assert.h>
 #include <string.h>
-#include <strings.h>
 
 #include "config.h"
 #include "mp_msg.h"
@@ -50,6 +49,10 @@
 #else
 #define mp_msg(t, l, ...) fprintf(stderr, __VA_ARGS__)
 #endif
+#include <strings.h>
+#define av_strcasecmp(a, b) strcasecmp(a, b)
+#else
+#include <libavutil/avstring.h>
 #endif
 
 #include "help_mp.h"
@@ -816,13 +819,13 @@ int parse_codec_cfg(const char *cfgfile)
         } else if (!strcmp(token[0], "status")) {
             if (get_token(1, 1) < 0)
                 goto err_out_parse_error;
-            if (!strcasecmp(token[0], "working"))
+            if (!av_strcasecmp(token[0], "working"))
                 codec->status = CODECS_STATUS_WORKING;
-            else if (!strcasecmp(token[0], "crashing"))
+            else if (!av_strcasecmp(token[0], "crashing"))
                 codec->status = CODECS_STATUS_NOT_WORKING;
-            else if (!strcasecmp(token[0], "untested"))
+            else if (!av_strcasecmp(token[0], "untested"))
                 codec->status = CODECS_STATUS_UNTESTED;
-            else if (!strcasecmp(token[0], "buggy"))
+            else if (!av_strcasecmp(token[0], "buggy"))
                 codec->status = CODECS_STATUS_PROBLEMS;
             else
                 goto err_out_parse_error;


More information about the MPlayer-cvslog mailing list