Mercurial > mplayer.hg
changeset 14619:f5e2fa7ec219
adding proper parenthesing
author | alex |
---|---|
date | Mon, 31 Jan 2005 11:21:31 +0000 |
parents | 4048581850f0 |
children | b9a05a395726 |
files | libmpcodecs/pullup.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/pullup.c Mon Jan 31 11:18:31 2005 +0000 +++ b/libmpcodecs/pullup.c Mon Jan 31 11:21:31 2005 +0000 @@ -218,16 +218,16 @@ struct pullup_buffer *pullup_lock_buffer(struct pullup_buffer *b, int parity) { if (!b) return 0; - if (parity+1 & 1) b->lock[0]++; - if (parity+1 & 2) b->lock[1]++; + if ((parity+1) & 1) b->lock[0]++; + if ((parity+1) & 2) b->lock[1]++; return b; } void pullup_release_buffer(struct pullup_buffer *b, int parity) { if (!b) return; - if (parity+1 & 1) b->lock[0]--; - if (parity+1 & 2) b->lock[1]--; + if ((parity+1) & 1) b->lock[0]--; + if ((parity+1) & 2) b->lock[1]--; } struct pullup_buffer *pullup_get_buffer(struct pullup_context *c, int parity) @@ -253,8 +253,8 @@ /* Search for any half-free buffer */ for (i = 0; i < c->nbuffers; i++) { - if (parity+1 & 1 && c->buffers[i].lock[0]) continue; - if (parity+1 & 2 && c->buffers[i].lock[1]) continue; + if (((parity+1) & 1) && c->buffers[i].lock[0]) continue; + if (((parity+1) & 2) && c->buffers[i].lock[1]) continue; alloc_buffer(c, &c->buffers[i]); return pullup_lock_buffer(&c->buffers[i], parity); }