[FFmpeg-cvslog] r22937 - in trunk: libavcodec/amrnbdec.c libavcodec/atrac1.c libavcodec/audioconvert.c libavcodec/qcelpdata.h libavcodec/qcelpdec.c libavcodec/ra288.c libavcodec/sipr.c libavcodec/sipr16k.c libavco...
Andreas Öman
andreas
Sat Apr 24 21:23:06 CEST 2010
Andreas ?man wrote:
> rbultje wrote:
>> Author: rbultje
>> Date: Wed Apr 21 19:57:48 2010
>> New Revision: 22937
>>
>> Log:
>> Move clipping of audio samples (for those codecs outputting float)
>> from decoder
>> to the audio conversion routines.
>>
>> Modified: trunk/libavutil/common.h
>> ==============================================================================
>>
>> --- trunk/libavutil/common.h Wed Apr 21 19:51:37 2010 (r22936)
>> +++ trunk/libavutil/common.h Wed Apr 21 19:57:48 2010 (r22937)
>> @@ -145,6 +145,17 @@ static inline av_const int16_t av_clip_i
>> }
>>
>> /**
>> + * Clips a signed 64-bit integer value into the
>> -2147483648,2147483647 range.
>> + * @param a value to clip
>> + * @return clipped value
>> + */
>> +static inline av_const int32_t av_clipl_int32(int64_t a)
>> +{
>> + if ((a+2147483648) & ~2147483647) return (a>>63) ^ 2147483647;
>> + else return a;
>> +}
>> +
>> +/**
>
> This trips a warning if not compiled with c99 (for example an
> application that happens to include libavutil/common.h). Not only
> annoying but for applications compiling with -Werror this results in
> build fail.
>
> common.h:154: error: this decimal constant is unsigned only in ISO C90
>
> I'm not sure but do we require that apps pulling include files from
> FFmpeg to be compiled in c99 mode? I think not, but I don't really know.
>
> I guess this could be easily fixed by adding the correct LL or ULL
> postfixes to the constants.
>
> Opinions?
This patch fixes the issue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: common.diff
Type: text/x-patch
Size: 449 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20100424/acfa6162/attachment.bin>
More information about the ffmpeg-cvslog
mailing list