[FFmpeg-cvslog] r12246 - in trunk: configure libavcodec/avcodec.h libavdevice/avdevice.h libavformat/avformat.h libavutil/avutil.h libpostproc/postprocess.h

Måns Rullgård mans
Thu Feb 28 01:32:06 CET 2008


Michael Niedermayer <michaelni at gmx.at> writes:

> On Wed, Feb 27, 2008 at 11:05:53PM +0000, M?ns Rullg?rd wrote:
>> Diego Biurrun <diego at biurrun.de> writes:
>> 
>> > On Tue, Feb 26, 2008 at 09:37:59PM +0100, mru wrote:
>> >> 
>> >> Log:
>> >> less preprocessor magic in version number macros
>> >> 
>> >> --- trunk/libavutil/avutil.h	(original)
>> >> +++ trunk/libavutil/avutil.h	Tue Feb 26 21:37:59 2008
>> >> @@ -30,16 +30,20 @@
>> >>  
>> >> +#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
>> >> +#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
>> >> +#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
>> >
>> > Why the indirection with AV_VERSION_DOT?
>> 
>> Otherwise you get LIBAVCODEC_VERSION defined as 51 . 50 . 1 (note the
>> spaces), which is not what we want.  It's our saving grace that a C
>> "preprocessor number" can contain any number of dots (but only one at
>> a time).
>
> Yes, but if it were a string (yes theoretic API break) we could use
> AV_STRINGIFY() and avoid these 3 macros above.

People are using those macros.  If you don't believe me, go google it
yourself.  In other instances, you to great lengths to avoid breaking
API.  What makes you dislike a couple of macros so badly that you are
willing to sacrifice API compatibility to get rid of them?

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-cvslog mailing list