Repository navigation
Commit 9ea1b7a
[media] v4l2-ctrls: compare values only once
When setting a control the control's new value is compared to the current
value twice: once by new_to_cur(), once by cluster_changed(). Not a big
deal when dealing with simple values, but it can be a problem when dealing
with compound types or arrays. So fix this: cluster_changed() sets the
has_changed flag, which is used by new_to_cur() instead of having to do
another compare.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>1 parent 000e4f9 commit 9ea1b7a
2 files changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1424 | 1424 | | |
1425 | 1425 | | |
1426 | 1426 | | |
1427 | | - | |
1428 | | - | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
1429 | 1432 | | |
1430 | 1433 | | |
1431 | 1434 | | |
| |||
1462 | 1465 | | |
1463 | 1466 | | |
1464 | 1467 | | |
1465 | | - | |
| 1468 | + | |
1466 | 1469 | | |
1467 | 1470 | | |
1468 | | - | |
| 1471 | + | |
1469 | 1472 | | |
1470 | 1473 | | |
1471 | 1474 | | |
1472 | 1475 | | |
1473 | | - | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
1474 | 1479 | | |
1475 | | - | |
| 1480 | + | |
1476 | 1481 | | |
1477 | 1482 | | |
1478 | 1483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
| 163 | + | |
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| |||
0 commit comments