Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-bluetooth-sbc: Commit

external/bluetooth/sbc


Commit MetaInfo

Révision130c50a3e61f8b9bedc85cabf29af80d1a5c2f85 (tree)
l'heure2014-01-23 01:47:48
AuteurMarcel Holtmann <marcel@holt...>
CommiterMarcel Holtmann

Message de Log

sbc: Use bool variable for priv->init

Change Summary

Modification

--- a/sbc/sbc.c
+++ b/sbc/sbc.c
@@ -1003,7 +1003,7 @@ static void sbc_encoder_init(bool msbc, struct sbc_encoder_state *state,
10031003 }
10041004
10051005 struct sbc_priv {
1006- int init;
1006+ bool init;
10071007 bool msbc;
10081008 struct SBC_ALIGNED sbc_frame frame;
10091009 struct SBC_ALIGNED sbc_decoder_state dec_state;
@@ -1211,7 +1211,7 @@ SBC_EXPORT ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len,
12111211
12121212 if (!priv->init) {
12131213 sbc_decoder_init(&priv->dec_state, &priv->frame);
1214- priv->init = 1;
1214+ priv->init = true;
12151215
12161216 sbc->frequency = priv->frame.frequency;
12171217 sbc->mode = priv->frame.mode;
@@ -1299,7 +1299,7 @@ SBC_EXPORT ssize_t sbc_encode(sbc_t *sbc, const void *input, size_t input_len,
12991299 priv->frame.length = sbc_get_frame_length(sbc);
13001300
13011301 sbc_encoder_init(priv->msbc, &priv->enc_state, &priv->frame);
1302- priv->init = 1;
1302+ priv->init = true;
13031303 } else if (priv->frame.bitpool != sbc->bitpool) {
13041304 priv->frame.length = sbc_get_frame_length(sbc);
13051305 priv->frame.bitpool = sbc->bitpool;
@@ -1483,7 +1483,7 @@ SBC_EXPORT int sbc_reinit(sbc_t *sbc, unsigned long flags)
14831483
14841484 priv = sbc->priv;
14851485
1486- if (priv->init == 1)
1486+ if (priv->init)
14871487 memset(sbc->priv, 0, sizeof(struct sbc_priv));
14881488
14891489 sbc_set_defaults(sbc, flags);
Afficher sur ancien navigateur de dépôt.