Display "unkown resolution" instead of Integer.MAX_VALUE

This commit is contained in:
0xboobface 2018-12-05 12:38:06 +01:00
parent a7b0b3f374
commit 9109fc8689
1 changed files with 5 additions and 1 deletions

View File

@ -44,7 +44,11 @@ public class StreamSource implements Comparable<StreamSource> {
public String toString() {
DecimalFormat df = new DecimalFormat("0.00");
float mbit = bandwidth / 1024.0f / 1024.0f;
return height + "p (" + df.format(mbit) + " Mbit/s)";
if(height == Integer.MAX_VALUE) {
return "unknown resolution (" + df.format(mbit) + " Mbit/s)";
} else {
return height + "p (" + df.format(mbit) + " Mbit/s)";
}
}
/**