aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis.issaris@uhasselt.be>2007-02-18 21:23:50 +0000
committerPanagiotis Issaris <takis.issaris@uhasselt.be>2007-02-18 21:23:50 +0000
commit9b2bb403419527d9f7691172683fffebc0908405 (patch)
treeb5aa9e971d7810dceb090001f6677129112fb649 /libavcodec
parenta40de11209bd67845fae20ca1aabe7d312ee0de7 (diff)
downloadffmpeg-9b2bb403419527d9f7691172683fffebc0908405.tar.gz
Remove a non-C dependency (being M_PI) from the libavcodec example.
Originally committed as revision 8025 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/apiexample.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/apiexample.c b/libavcodec/apiexample.c
index 484c778764..2ddaeb1d52 100644
--- a/libavcodec/apiexample.c
+++ b/libavcodec/apiexample.c
@@ -32,6 +32,8 @@
#include <string.h>
#include <math.h>
+#define PI 3.14159265358979323846
+
#ifdef HAVE_AV_CONFIG_H
#undef HAVE_AV_CONFIG_H
#endif
@@ -89,7 +91,7 @@ void audio_encode_example(const char *filename)
/* encode a single tone sound */
t = 0;
- tincr = 2 * M_PI * 440.0 / c->sample_rate;
+ tincr = 2 * PI * 440.0 / c->sample_rate;
for(i=0;i<200;i++) {
for(j=0;j<frame_size;j++) {
samples[2*j] = (int)(sin(t) * 10000);