Don't redefine M_PI. It is already defined from libavutil/mathematics.h.