summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/advtime.c17
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);
}