summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-11-02 20:17:25 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-11-03 19:25:26 +0100
commit96949dafcca87f65902bd77a0bc56007d9cead70 (patch)
treee394623e56efc86b70d3e7fbdefc2555457b3aa3 /libavfilter
parent475fb67d0b391ad1e8e3e8e3d65d7e6892e17e7a (diff)
Replace all strcasecmp/strncasecmp usages.
All current usages of it are incompatible with localization. For example strcasecmp("i", "I") != 0 is possible, but would break many of the places where it is used. Instead use our own implementations that always treat the data as ASCII. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/libmpcodecs/vf_palette.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libavfilter/libmpcodecs/vf_palette.c b/libavfilter/libmpcodecs/vf_palette.c
index 3a7f0869bf..543b6c72d9 100644
--- a/libavfilter/libmpcodecs/vf_palette.c
+++ b/libavfilter/libmpcodecs/vf_palette.c
@@ -16,10 +16,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _BSD_SOURCE //strcasecmp
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <inttypes.h>
#include "config.h"
@@ -33,6 +31,8 @@
#include "libswscale/swscale.h"
+#include "libavutil/avstring.h"
+
//===========================================================================//
// 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){
for(i=0;i<256;i++) gray_pal[i]=0x01010101*i;
if (args)
{
- if (!strcasecmp(args,"rgb15")) vf->priv->fmt=IMGFMT_RGB15; else
- if (!strcasecmp(args,"rgb16")) vf->priv->fmt=IMGFMT_RGB16; else
- if (!strcasecmp(args,"rgb24")) vf->priv->fmt=IMGFMT_RGB24; else
- if (!strcasecmp(args,"rgb32")) vf->priv->fmt=IMGFMT_RGB32; else
- if (!strcasecmp(args,"bgr15")) vf->priv->fmt=IMGFMT_BGR15; else
- if (!strcasecmp(args,"bgr16")) vf->priv->fmt=IMGFMT_BGR16; else
- if (!strcasecmp(args,"bgr24")) vf->priv->fmt=IMGFMT_BGR24; else
- if (!strcasecmp(args,"bgr32")) vf->priv->fmt=IMGFMT_BGR32; else
+ if (!av_strcasecmp(args,"rgb15")) vf->priv->fmt=IMGFMT_RGB15; else
+ if (!av_strcasecmp(args,"rgb16")) vf->priv->fmt=IMGFMT_RGB16; else
+ if (!av_strcasecmp(args,"rgb24")) vf->priv->fmt=IMGFMT_RGB24; else
+ if (!av_strcasecmp(args,"rgb32")) vf->priv->fmt=IMGFMT_RGB32; else
+ if (!av_strcasecmp(args,"bgr15")) vf->priv->fmt=IMGFMT_BGR15; else
+ if (!av_strcasecmp(args,"bgr16")) vf->priv->fmt=IMGFMT_BGR16; else
+ if (!av_strcasecmp(args,"bgr24")) vf->priv->fmt=IMGFMT_BGR24; else
+ if (!av_strcasecmp(args,"bgr32")) vf->priv->fmt=IMGFMT_BGR32; else
{
mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args);
return 0;