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

Måns Rullgård mans
Mon Feb 7 01:42:44 CET 2011


Baptiste Coudurier <baptiste.coudurier at gmail.com> writes:

> On 02/06/2011 01:47 PM, Anton Khirnov 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++;
>>       return !*str;
>
> Duh, newline (\n) is ascii and can be coded as such, think about lyrics.

What about tab and friends?  9-13 are all various whitespace
characters?

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list