[FFmpeg-devel] [PATCH] avcodec/ac3enc: use long long after switch to 64 bit bitrate

Ganesh Ajjanagadde gajjanag at mit.edu
Fri Sep 18 23:35:33 CEST 2015

On Fri, Sep 18, 2015 at 5:30 PM, James Almer <jamrial at gmail.com> wrote:
> On 9/17/2015 9:46 AM, Ganesh Ajjanagadde wrote:
>> Commit 7404f3bdb switched bitrate to 64 bits.
>> This triggers -Wabsolute-value on clang, e.g
>> http://fate.ffmpeg.org/log.cgi?time=20150917122742&log=compile&slot=x86_64-darwin-clang-3.7-O3.
>> Therefore, usage of abs is changed to llabs, which is available on all of the platforms.
>> Have not tested whether LLONG_MAX (C99 feature) is available on Microsoft or not.
> Use int64_t and INT64_MAX instead.

I can definitely do that, but am curious about this. The codebase
already uses long long (see e.g ffprobe), and morally llabs returns
long long; hence I use it. As for the INT64_MAX, I do not have a
current example to know whether it is safe on all platforms, but
again, the "clean" solution is LLONG_MAX due to the type of llabs.

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list