If picture does no exist, warn and exit
[cascardo/movie.git] / movie.c
diff --git a/movie.c b/movie.c
index b7c04cc..ec850ad 100644 (file)
--- a/movie.c
+++ b/movie.c
@@ -79,6 +79,11 @@ ReadPoints (char *filename)
   Point last;
   Point rect;
   file = fopen (filename, "r");
+  if (file == NULL)
+    {
+      fprintf (stderr, "Could not open file %s\n", filename);
+      exit (1);
+    }
   points = g_array_new (FALSE, TRUE, sizeof (Point));
   buffer = NULL;
   len = 0;
@@ -149,12 +154,12 @@ get_scales (int n)
   double scale;
   double factor;
   scales = g_array_new (FALSE, TRUE, sizeof (double));
-  factor = pow (8.0, 1.0/((double) n/2));
+  factor = pow (4.0, 1.0/((double) n/2));
   factor = 1.0/factor;
-  for (scale = 4.00; scale > 0.5 && scales->len < n/2; scale *= factor)
+  for (scale = 4.00; scale > 1.0 && scales->len < n/2; scale *= factor)
     scales = g_array_append_val (scales, scale);
   factor = 1.0/factor;
-  for (scale = 0.5; scale < 4.0 && scales->len < n; scale *= factor)
+  for (scale = 1.0; scale < 4.0 && scales->len < n; scale *= factor)
     scales = g_array_append_val (scales, scale);
   return scales;
 }