[FFmpeg-cvslog] r20874 - trunk/libavcodec/aac.c

Alex Converse alex.converse
Wed Dec 16 21:05:39 CET 2009


On Wed, Dec 16, 2009 at 7:53 AM, Uoti Urpala <uoti.urpala at pp1.inet.fi> wrote:
> On Tue, 2009-12-15 at 21:23 -0500, David Conrad wrote:
>> This breaks gcc and clang probably because they assume that an enum cannot have a value other than what's listed, and so assume type >= TYPE_SCE is always true.
>
> Not quite. The issue is the integer type used for the enum type. Exactly
> which one is chosen is implementation-defined behavior. With default
> options GCC defines it as "the type is unsigned int if there are no
> negative values in the enumeration, otherwise int.". So the bug in
> Carl's change was that he made the type unsigned, thus rendering the
> ">= 0" test meaningless. GCC made no further assumptions about exactly
> which values representable as unsigned int could appear.
>

Before anybody gets any fancy ideas about reversing the loop, TYPE_CCE
has to be processed before TYPE_CPE and TYPE_SCE.



More information about the ffmpeg-cvslog mailing list