[FFmpeg-devel] [PATCH] mp3enc: fix ISO-8859-1 range

Michael Niedermayer michaelni
Sun Feb 6 23:04:51 CET 2011


On Sun, Feb 06, 2011 at 03:02:25PM -0700, Daniel Verkamp wrote:
> On Sun, Feb 6, 2011 at 2:47 PM, Anton Khirnov <anton at khirnov.net> wrote:
> > It starts on 32, not 1.
> >
> > Thanks to Arpi for spotting this.
> > ---
> > ?libavformat/mp3enc.c | ? ?2 +-
> > ?1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
> > index 5921ded..d043296 100644
> > --- a/libavformat/mp3enc.c
> > +++ b/libavformat/mp3enc.c
> > @@ -79,7 +79,7 @@ static void id3v2_put_size(AVFormatContext *s, int size)
> >
> > ?static int string_is_ascii(const uint8_t *str)
> > ?{
> > - ? ?while (*str && *str < 128) str++;
> > + ? ?while (*str && *str >= 32 *str < 128) str++;
> 
> This looks plain wrong... you probably meant something like:
>   while (*str >= 32 && *str < 128) str++;

while ((int8_t)*str >= 32) str++;


[...]
--
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110206/455a4989/attachment.pgp>



More information about the ffmpeg-devel mailing list