]> git.sesse.net Git - ffmpeg/blobdiff - tests/tiny_psnr.c
Add av_log_{ask_for_sample|missing_feature} replacements to libavutil
[ffmpeg] / tests / tiny_psnr.c
index 5db266247823c72f9d2866031eae99710269cc23..b1bcc166937b99b82b88bd0e8c0ddc223e0f5f6d 100644 (file)
@@ -139,14 +139,14 @@ int main(int argc, char *argv[])
         } else {
             char *end;
             len = strtol(argv[3], &end, 0);
-            if (*end || len > 2) {
+            if (*end || len < 1 || len > 2) {
                 fprintf(stderr, "Unsupported sample format: %s\n", argv[3]);
                 return 1;
             }
         }
     }
 
-    max = (1 << (8 * len)) - 1;
+    max = (1LL << (8 * len)) - 1;
 
     f[0] = fopen(argv[1], "rb");
     f[1] = fopen(argv[2], "rb");