diff --git a/libavutil/base64.c b/libavutil/base64.c
index d16195f1b90fffca47c937cdfe4bea23968ca7e6..725b03504d68fea5a11073affb6fa43413cfb33b 100644
--- a/libavutil/base64.c
+++ b/libavutil/base64.c
@@ -156,7 +156,10 @@ int main(void)
     for (i = 0; i < FF_ARRAY_ELEMS(tests); i++)
         error_count += test_encode_decode(tests[i].data, strlen(tests[i].data), tests[i].encoded_ref);
 
-    return error_count;
+    if (error_count)
+        printf("Error Count: %d.\n", error_count);
+
+    return !!error_count;
 }
 
 #endif