[Libav-user] libavutil av_mod_i assertion

Kevin Williams k at cwill.org
Fri Jul 1 22:57:24 CEST 2011


I'm using libav0.6.2 and I'm wondering what the purpose of the 2nd
assertion in libavutil/integer.c is:

assert(av_log2(b)>=0);

My older compiler (gcc 2.96) complains that b is an incompatible type
for av_log2.  av_log2 is actually av_log2_c via #define and av_log2_c
takes a single unsigned integer.  b type AVInteger and AVInteger is:

typedef struct AVInteger{
    uint16_t v[AV_INTEGER_SIZE];
} AVInteger;

So it seems you need to pass in b.v[N], but I don't know what N should
be.  Do we want to check if result of each value in V is >= 0, just
the last value, just first value, etc?

Thanks in advance,
-Kevin


More information about the Libav-user mailing list