props: filter range against fixed value or enum

Fix start of iteration when a range is filtered against a fixed value
or an enum.
This commit is contained in:
David Svensson Fors 2017-03-02 13:38:53 +01:00 committed by Wim Taymans
parent 5440435405
commit 6e4a7c779a

View file

@ -236,7 +236,7 @@ spa_props_filter (SpaPODBuilder *b,
(rt1 == SPA_POD_PROP_RANGE_MIN_MAX && rt2 == SPA_POD_PROP_RANGE_ENUM)) {
int n_copied = 0;
/* copy all values inside the range */
for (k = 0, a1 = alt2, a2 = alt2; k < nalt2; k++, a2 += p2->body.value.size) {
for (k = 0, a1 = alt1, a2 = alt2; k < nalt2; k++, a2 += p2->body.value.size) {
if (compare_value (p1->body.value.type, a2, a1) < 0)
continue;
if (compare_value (p1->body.value.type, a2, a1 + p1->body.value.size) > 0)