Don't mix declarations and statements.
authorDiego Biurrun <diego@biurrun.de>
Mon, 16 Oct 2006 10:20:33 +0000 (10:20 +0000)
committerDiego Biurrun <diego@biurrun.de>
Mon, 16 Oct 2006 10:20:33 +0000 (10:20 +0000)
Originally committed as revision 6705 to svn://svn.ffmpeg.org/ffmpeg/trunk

vhook/fish.c

index 7ab34483abb532d4f721c1ab3e6a05e8feae0b12..a2dbd2f27b9570c6b17c8f9027971452dd846aaa 100644 (file)
@@ -338,6 +338,9 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width,
             }
 
             if (foundfile < ci->file_limit) {
+                FILE *f;
+                char fname[256];
+
                 size = avpicture_get_size(PIX_FMT_RGB24, width, height);
                 buf = av_malloc(size);
 
@@ -360,10 +363,6 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width,
                               picture1.data, picture1.linesize);
 
                     /* Write out the PPM file */
-
-                    FILE *f;
-                    char fname[256];
-
                     snprintf(fname, sizeof(fname), "%s/fishimg%ld_%"PRId64".ppm", ci->dir, (long)(av_gettime() / 1000000), pts);
                     f = fopen(fname, "w");
                     if (f) {