On Mon, Oct 29, 2012 at 9:20 AM, Måns Rullgård <m...@mansr.com> wrote: > Alex Converse <alex.conve...@gmail.com> writes: > >> On Fri, Oct 26, 2012 at 5:50 PM, Mans Rullgard <m...@mansr.com> wrote: >>> The C99 standard requires that "the expression that defines the value of >>> an enumeration constant shall be an integer constant expression that has >>> a value representable as an int." >>> >>> Signed-off-by: Mans Rullgard <m...@mansr.com> >>> --- >>> libavformat/mov_chan.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c >>> index 00a2a4b..d7eb528 100644 >>> --- a/libavformat/mov_chan.c >>> +++ b/libavformat/mov_chan.c >>> @@ -45,7 +45,7 @@ >>> * do not specify a particular ordering of those channels." >>> */ >>> enum MovChannelLayoutTag { >>> - MOV_CH_LAYOUT_UNKNOWN = 0xFFFF0000, >>> + MOV_CH_LAYOUT_UNKNOWN = ( -1 << 16), >> >> Your replacement is undefined: >> >> 6.5.7 Bitwise shift operators >> >> The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated >> bits are filled with zeros. If E1 has an unsigned type, the value of >> the result is E1 × 2^E2 , reduced modulo one more than the maximum >> value representable in the result type. If E1 has a signed type and >> nonnegative value, and E1 × 2^E2 is representable in the result type, >> then that is the resulting value; otherwise, the behavior is >> undefined. > > We shift negative values all the time. >
That may be the case, but this patch does not "make enum MovChannelLayoutTag definition standards compliant". _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel