[FFmpeg-cvslog] alac: avoid using a double-negative when checking if the frame is compressed
Justin Ruggles
git at videolan.org
Thu Jul 19 23:35:54 CEST 2012
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Mon Jul 9 13:05:35 2012 -0400| [46043962eaf2a8f29290e9ffc19829fceb53f304] | committer: Justin Ruggles
alac: avoid using a double-negative when checking if the frame is compressed
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46043962eaf2a8f29290e9ffc19829fceb53f304
---
libavcodec/alac.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 474531b..f803f9a 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -298,7 +298,7 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
unsigned int outputsamples;
int hassize;
unsigned int readsamplesize;
- int isnotcompressed;
+ int is_compressed;
uint8_t interlacing_shift;
uint8_t interlacing_leftweight;
int i, ch, ret;
@@ -320,7 +320,7 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
alac->extra_bits = get_bits(&alac->gb, 2) << 3;
/* whether the frame is compressed */
- isnotcompressed = get_bits1(&alac->gb);
+ is_compressed = !get_bits1(&alac->gb);
if (hassize) {
/* now read the number of samples as a 32bit integer */
@@ -350,8 +350,7 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
return -1;
}
- if (!isnotcompressed) {
- /* so it is compressed */
+ if (is_compressed) {
int16_t predictor_coef_table[MAX_CHANNELS][32];
int predictor_coef_num[MAX_CHANNELS];
int prediction_type[MAX_CHANNELS];
More information about the ffmpeg-cvslog
mailing list