[FFmpeg-cvslog] tests/examples: Mark some variables only used within their files as static.

Diego Biurrun git at videolan.org
Fri Dec 9 00:18:55 CET 2011


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Sep 21 18:44:41 2011 +0200| [4dccfff9dd01d6c45731cda21fc6ea0a649d6581] | committer: Diego Biurrun

tests/examples: Mark some variables only used within their files as static.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4dccfff9dd01d6c45731cda21fc6ea0a649d6581
---

 libavcodec/dct-test.c        |    2 +-
 libavcodec/motion-test.c     |    4 ++--
 libavformat/output-example.c |   16 ++++++++--------
 libavutil/adler32.c          |    4 +++-
 4 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index d304549..1665682 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -151,7 +151,7 @@ static const struct algo idct_tab[] = {
 
 #define AANSCALE_BITS 12
 
-uint8_t cropTbl[256 + 2 * MAX_NEG_CROP];
+static uint8_t cropTbl[256 + 2 * MAX_NEG_CROP];
 
 static int64_t gettime(void)
 {
diff --git a/libavcodec/motion-test.c b/libavcodec/motion-test.c
index b054fc9..8708636 100644
--- a/libavcodec/motion-test.c
+++ b/libavcodec/motion-test.c
@@ -38,8 +38,8 @@
 #define WIDTH 64
 #define HEIGHT 64
 
-uint8_t img1[WIDTH * HEIGHT];
-uint8_t img2[WIDTH * HEIGHT];
+static uint8_t img1[WIDTH * HEIGHT];
+static uint8_t img2[WIDTH * HEIGHT];
 
 static void fill_random(uint8_t *tab, int size)
 {
diff --git a/libavformat/output-example.c b/libavformat/output-example.c
index 809e236..a1702cd 100644
--- a/libavformat/output-example.c
+++ b/libavformat/output-example.c
@@ -51,11 +51,11 @@ static int sws_flags = SWS_BICUBIC;
 /**************************************************************/
 /* audio output */
 
-float t, tincr, tincr2;
-int16_t *samples;
-uint8_t *audio_outbuf;
-int audio_outbuf_size;
-int audio_input_frame_size;
+static float t, tincr, tincr2;
+static int16_t *samples;
+static uint8_t *audio_outbuf;
+static int audio_outbuf_size;
+static int audio_input_frame_size;
 
 /*
  * add an audio output stream
@@ -190,9 +190,9 @@ static void close_audio(AVFormatContext *oc, AVStream *st)
 /**************************************************************/
 /* video output */
 
-AVFrame *picture, *tmp_picture;
-uint8_t *video_outbuf;
-int frame_count, video_outbuf_size;
+static AVFrame *picture, *tmp_picture;
+static uint8_t *video_outbuf;
+static int frame_count, video_outbuf_size;
 
 /* add a video output stream */
 static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id)
diff --git a/libavutil/adler32.c b/libavutil/adler32.c
index 9d3d896..7f5afdb 100644
--- a/libavutil/adler32.c
+++ b/libavutil/adler32.c
@@ -60,7 +60,9 @@ unsigned long av_adler32_update(unsigned long adler, const uint8_t * buf,
 #include "log.h"
 #include "timer.h"
 #define LEN 7001
-volatile int checksum;
+
+static volatile int checksum;
+
 int main(int argc, char **argv)
 {
     int i;



More information about the ffmpeg-cvslog mailing list