mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
Fix compilation with -Werror=float-conversion
Better make the conversions explicit so that we don't get any surprises. Fixes #4065
This commit is contained in:
parent
50870aac57
commit
1ae4374ccf
71 changed files with 286 additions and 284 deletions
|
|
@ -868,7 +868,7 @@ int format_info_to_spec(const struct format_info *info, struct sample_spec *ss,
|
|||
if (spa_json_is_float(val, len)) {
|
||||
if (spa_json_parse_float(val, len, &f) <= 0)
|
||||
return -EINVAL;
|
||||
ss->channels = f;
|
||||
ss->channels = (uint8_t)f;
|
||||
} else if (spa_json_is_array(val, len)) {
|
||||
return -ENOTSUP;
|
||||
} else if (spa_json_is_object(val, len)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue