# HG changeset patch # User reimar # Date 1222964955 0 # Node ID 98d37cfc40a1e3c45837d711ff851707c4fb28e9 # Parent fcc940b7952eef9574c54727a6ac0c07dfe5b5ca Use M_PI from libavutil/mathematics.h instead of defining PI ourselves in libavcodec/apiexample.c. diff -r fcc940b7952e -r 98d37cfc40a1 apiexample.c --- a/apiexample.c Thu Oct 02 16:29:06 2008 +0000 +++ b/apiexample.c Thu Oct 02 16:29:15 2008 +0000 @@ -30,15 +30,13 @@ #include #include #include -#include - -#define PI 3.14159265358979323846 #ifdef HAVE_AV_CONFIG_H #undef HAVE_AV_CONFIG_H #endif #include "avcodec.h" +#include "libavutil/mathematics.h" #define INBUF_SIZE 4096 @@ -91,7 +89,7 @@ /* encode a single tone sound */ t = 0; - tincr = 2 * PI * 440.0 / c->sample_rate; + tincr = 2 * M_PI * 440.0 / c->sample_rate; for(i=0;i<200;i++) { for(j=0;j