rate_hist,show_histogram: fix crash w/0 buckets
this can occur if 0 frames are encoded, e.g., due to --skip see also: https://crbug.com/aomedia/3243 Change-Id: I791d5ad6611dbcb60d790e6b705298328ec48126
This commit is contained in:
@@ -196,7 +196,9 @@ static void show_histogram(const struct hist_bucket *bucket, int buckets,
|
||||
int width1, width2;
|
||||
int i;
|
||||
|
||||
if (!buckets) return;
|
||||
assert(bucket != NULL);
|
||||
assert(buckets > 0);
|
||||
|
||||
switch ((int)(log(bucket[buckets - 1].high) / log(10)) + 1) {
|
||||
case 1:
|
||||
|
||||
Reference in New Issue
Block a user