[Ffmpeg-devel] [PATCH] support for vorbis language in native ogg demuxer

Måns Rullgård mru
Thu Jun 22 21:25:30 CEST 2006


Rich Felker <dalias at aerifal.cx> writes:

> On Thu, Jun 22, 2006 at 06:54:08PM +0100, M?ns Rullg?rd wrote:
>> Rich Felker <dalias at aerifal.cx> writes:
>> 
>> > On Wed, Jun 21, 2006 at 12:49:28AM +0200, Nico Sabbi wrote:
>> >> $Subject says everything, but there's to notice that (as for everything
>> >> that has to deal with stuff done by xiph) there are hideous shortcomings:
>> >> - the language is identified in a non-standardized way, so it's
>> >> longer than 3 characters and in a mixed-case format (e.g. English,
>> >> Japanese, etc.)
>> >> - I didn't strtolower() them because afaik this depends on the charset used
>> >
>> > Charset is ASCII [A-Za-z]. Just or each byte with 0x20, IMO. :)
>> 
>> Vorbis comments are utf8.  Furthermore, there is no official field for
>> language.  Thus we must assume that a language field, if present,
>> might contain anything.
>
> However, anything but established language names will be meaningless,
> so does it matter if we mangle invalid data in the field?

Randomly flipping bits in utf8 data is not a good idea.  With bad
luck, the result won't be valid utf8, and even if it is valid, it
could be anything.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list