[FFmpeg-devel] [PATCH] Replace all strcasecmp/strncasecmp usages.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Nov 2 21:04:03 CET 2011


On Wed, Nov 02, 2011 at 08:57:08PM +0100, Michael Niedermayer wrote:
> On Wed, Nov 02, 2011 at 08:26:19PM +0100, Reimar Döffinger wrote:
> > 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 at gmx.de>
> > ---
> >  libavdevice/v4l2.c                   |    4 ++--
> >  libavfilter/libmpcodecs/vf_palette.c |   20 ++++++++++----------
> >  libavformat/avidec.c                 |    4 ++--
> >  libavformat/http.c                   |   17 ++++++++---------
> >  libavformat/img2.c                   |    7 +++----
> >  libavformat/matroskaenc.c            |    4 ++--
> >  libavformat/metadata.c               |    6 +++---
> >  libavformat/mp3enc.c                 |    3 +--
> >  libavformat/nutdec.c                 |    5 ++---
> >  libavformat/rtpdec.c                 |    4 ++--
> >  libavformat/rtpdec_mpeg4.c           |    3 +--
> >  libavformat/rtsp.c                   |   11 +++++------
> >  libavformat/utils.c                  |    7 +++----
> >  libavutil/avstring.c                 |   27 +++++++++++++++++++++++++++
> >  libavutil/avstring.h                 |   12 ++++++++++++
> >  libavutil/avutil.h                   |    2 +-
> >  libavutil/internal.h                 |    4 ++++
> >  libavutil/parseutils.c               |    7 +++----
> >  18 files changed, 91 insertions(+), 56 deletions(-)
> 
> LGTM, thanks

Since it touches a lot of code by other people and I have not closely
looked at the individual changes I'd welcome if some more people
could give it a bit of a look.
Otherwise I'll probably apply tomorrow.


More information about the ffmpeg-devel mailing list