diff --git a/spa/include/spa/param/audio/raw-types.h b/spa/include/spa/param/audio/raw-types.h index fbaa80abf..d01ad4fd5 100644 --- a/spa/include/spa/param/audio/raw-types.h +++ b/spa/include/spa/param/audio/raw-types.h @@ -314,4 +314,4 @@ static const struct spa_type_info spa_type_audio_volume_ramp_scale[] = { } /* extern "C" */ #endif -#endif /* SPA_AUDIO_RAW_RAW_TYPES_H */ +#endif /* SPA_AUDIO_RAW_TYPES_H */ diff --git a/spa/include/spa/param/audio/raw-utils.h b/spa/include/spa/param/audio/raw-utils.h index 3bb94eaa3..da1ec7317 100644 --- a/spa/include/spa/param/audio/raw-utils.h +++ b/spa/include/spa/param/audio/raw-utils.h @@ -89,7 +89,7 @@ spa_format_audio_raw_ext_build(struct spa_pod_builder *builder, uint32_t id, /* we drop the positions here when we can't read all of them. This is * really a malformed spa_audio_info structure. */ if (!SPA_FLAG_IS_SET(info->flags, SPA_AUDIO_FLAG_UNPOSITIONED) && - max_position > info->channels) { + info->channels <= max_position) { spa_pod_builder_add(builder, SPA_FORMAT_AUDIO_position, SPA_POD_Array(sizeof(uint32_t), SPA_TYPE_Id, info->channels, info->position), 0);