osmo_{fr,hr}_check_sid(): Use const input argument

Change-Id: If779cce63f06a18d4f3b0cb3d6dd7a99aa52a646
This commit is contained in:
Harald Welte 2017-05-31 02:47:43 +02:00
parent 43058efa93
commit 6789ba35a6
3 changed files with 6 additions and 6 deletions

View File

@ -63,8 +63,8 @@ static inline bool osmo_amr_is_speech(enum osmo_amr_type ft)
}
}
bool osmo_fr_check_sid(uint8_t *rtp_payload, size_t payload_len);
bool osmo_hr_check_sid(uint8_t *rtp_payload, size_t payload_len);
bool osmo_fr_check_sid(const uint8_t *rtp_payload, size_t payload_len);
bool osmo_hr_check_sid(const uint8_t *rtp_payload, size_t payload_len);
int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft,
enum osmo_amr_quality bfi);
int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr,

View File

@ -303,7 +303,7 @@ const uint16_t gsm610_bitorder[260] = {
* \param[in] payload_len Length of payload
* \returns true if code word is found, false otherwise
*/
bool osmo_fr_check_sid(uint8_t *rtp_payload, size_t payload_len)
bool osmo_fr_check_sid(const uint8_t *rtp_payload, size_t payload_len)
{
struct bitvec bv;
uint16_t i, z_bits[] = { 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73,
@ -321,7 +321,7 @@ bool osmo_fr_check_sid(uint8_t *rtp_payload, size_t payload_len)
if ((rtp_payload[0] >> 4) != 0xD)
return false;
bv.data = rtp_payload;
bv.data = (uint8_t *) rtp_payload;
bv.data_len = payload_len;
/* code word is all 0 at given bits, numbered from 1 */

View File

@ -277,11 +277,11 @@ static inline uint16_t mask(const uint8_t msb)
* \param[in] payload_len Length of payload
* \returns true if code word is found, false otherwise
*/
bool osmo_hr_check_sid(uint8_t *rtp_payload, size_t payload_len)
bool osmo_hr_check_sid(const uint8_t *rtp_payload, size_t payload_len)
{
uint8_t i, bits[] = { 1, 2, 8, 9, 5, 4, 9, 5, 4, 9, 5, 4, 9, 5 };
struct bitvec bv;
bv.data = rtp_payload;
bv.data = (uint8_t *) rtp_payload;
bv.data_len = payload_len;
bv.cur_bit = 33;