diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-11-14 13:38:31 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-11-14 13:38:40 +0100 |
commit | c8128060d0bd13e14ef33974beb5ec6fa74b1a4c (patch) | |
tree | 3a4ec8ba70f9d73841d13f95f25eb4e3e5f6b508 | |
parent | 0ac7529817ffcf3c1d708cb8b778aabcd31cbded (diff) | |
download | advtime-c8128060d0bd13e14ef33974beb5ec6fa74b1a4c.tar.gz advtime-c8128060d0bd13e14ef33974beb5ec6fa74b1a4c.tar.bz2 advtime-c8128060d0bd13e14ef33974beb5ec6fa74b1a4c.zip |
advtime: Fix warnings
-rw-r--r-- | src/advtime.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/advtime.c b/src/advtime.c index 07be68c..5dbe6d7 100644 --- a/src/advtime.c +++ b/src/advtime.c @@ -4,20 +4,7 @@ #include "video_decode.h" -static void -pgm_save(unsigned char *buf, int wrap, int xsize, int ysize, char *filename) -{ - FILE *f; - int i; - - f = fopen(filename, "w"); - fprintf(f, "P5\n%d %d\n%d\n", xsize, ysize, 255); - for(i=0; i < ysize; i++) - fwrite(buf + i * wrap, 1, xsize, f); - fclose(f); -} - -int64_t +static int64_t frame_average(struct video_frame *frame) { int64_t average = 0; @@ -55,7 +42,7 @@ main(int argc, char **argv) return -ret; while (video_decode_get_frame(vd, &frame) == 0) { - printf("%d\n", frame_average(frame)); + printf("%ld\n", frame_average(frame)); video_decode_free_frame(&frame); } |