---
Leftover from the previous set.
libavcodec/wavpack.c | 45 ++++++++++++++++++++++++++++++---------------
1 file changed, 30 insertions(+), 15 deletions(-)
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 37e8768..c74901d 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -406,7 +406,8 @@ static inline int wv_get_value_integer(WavpackFrameContext
*s, uint32_t *crc,
if (s->extra_bits){
S <<= s->extra_bits;
- if (s->got_extra_bits && get_bits_left(&s->gb_extra_bits) >=
s->extra_bits) {
+ if (s->got_extra_bits &&
+ get_bits_left(&s->gb_extra_bits) >= s->extra_bits) {
S |= get_bits(&s->gb_extra_bits, s->extra_bits);
*crc = *crc * 9 + (S & 0xffff) * 3 + ((unsigned)S >> 16);
}
@@ -460,7 +461,8 @@ static float wv_get_value_float(WavpackFrameContext *s,
uint32_t *crc, int S)
if (shift) {
S <<= shift;
if ((s->float_flag & WV_FLT_SHIFT_ONES) ||
- (s->got_extra_bits && (s->float_flag & WV_FLT_SHIFT_SAME)
&&
+ (s->got_extra_bits &&
+ (s->float_flag & WV_FLT_SHIFT_SAME) &&
get_bits1(&s->gb_extra_bits))) {
S |= (1 << shift) - 1;
} else if (s->got_extra_bits &&
@@ -780,7 +782,8 @@ static int wavpack_decode_block(AVCodecContext *avctx, int
block_no,
s = wc->fdec[block_no];
if (!s) {
- av_log(avctx, AV_LOG_ERROR, "Context for block %d is not present\n",
block_no);
+ av_log(avctx, AV_LOG_ERROR, "Context for block %d is not present\n",
+ block_no);
return -1;
}
@@ -831,11 +834,15 @@ static int wavpack_decode_block(AVCodecContext *avctx,
int block_no,
if (id & WP_IDF_ODD)
size--;
if (size < 0) {
- av_log(avctx, AV_LOG_ERROR, "Got incorrect block %02X with size
%i\n", id, size);
+ av_log(avctx, AV_LOG_ERROR,
+ "Got incorrect block %02X with size %i\n",
+ id, size);
break;
}
if (buf + ssize > buf_end) {
- av_log(avctx, AV_LOG_ERROR, "Block size %i is out of bounds\n",
size);
+ av_log(avctx, AV_LOG_ERROR,
+ "Block size %i is out of bounds\n",
+ size);
break;
}
if (id & WP_IDF_IGNORE) {
@@ -919,8 +926,9 @@ static int wavpack_decode_block(AVCodecContext *avctx, int
block_no,
break;
case WP_ID_ENTROPY:
if (size != 6 * (s->stereo_in + 1)) {
- av_log(avctx, AV_LOG_ERROR, "Entropy vars size should be %i, "
- "got %i", 6 * (s->stereo_in + 1), size);
+ av_log(avctx, AV_LOG_ERROR,
+ "Entropy vars size should be %i, got %i",
+ 6 * (s->stereo_in + 1), size);
buf += ssize;
continue;
}
@@ -958,7 +966,9 @@ static int wavpack_decode_block(AVCodecContext *avctx, int
block_no,
break;
case WP_ID_INT32INFO:
if (size != 4) {
- av_log(avctx, AV_LOG_ERROR, "Invalid INT32INFO, size = %i,
sent_bits = %i\n", size, *buf);
+ av_log(avctx, AV_LOG_ERROR,
+ "Invalid INT32INFO, size = %i, sent_bits = %i\n",
+ size, *buf);
buf += ssize;
continue;
}
@@ -986,7 +996,9 @@ static int wavpack_decode_block(AVCodecContext *avctx, int
block_no,
break;
case WP_ID_FLOATINFO:
if (size != 4) {
- av_log(avctx, AV_LOG_ERROR, "Invalid FLOATINFO, size = %i\n",
size);
+ av_log(avctx, AV_LOG_ERROR,
+ "Invalid FLOATINFO, size = %i\n",
+ size);
buf += ssize;
continue;
}
@@ -1020,7 +1032,8 @@ static int wavpack_decode_block(AVCodecContext *avctx,
int block_no,
break;
case WP_ID_CHANINFO:
if (size <= 1) {
- av_log(avctx, AV_LOG_ERROR, "Insufficient channel
information\n");
+ av_log(avctx, AV_LOG_ERROR,
+ "Insufficient channel information\n");
return -1;
}
chan = *buf++;
@@ -1040,9 +1053,10 @@ static int wavpack_decode_block(AVCodecContext *avctx,
int block_no,
chmask = avctx->channel_layout;
}
if (chan != avctx->channels) {
- av_log(avctx, AV_LOG_ERROR, "Block reports total %d channels, "
- "decoder believes it's %d channels\n", chan,
- avctx->channels);
+ av_log(avctx, AV_LOG_ERROR,
+ "Block reports total %d channels, "
+ "decoder believes it's %d channels\n",
+ chan, avctx->channels);
return -1;
}
if (!avctx->channel_layout)
@@ -1223,8 +1237,9 @@ static int wavpack_decode_frame(AVCodecContext *avctx,
void *data,
}
}
if (frame_size < 0 || frame_size > buf_size) {
- av_log(avctx, AV_LOG_ERROR, "Block %d has invalid size (size %d "
- "vs. %d bytes left)\n", s->block, frame_size, buf_size);
+ av_log(avctx, AV_LOG_ERROR,
+ "Block %d has invalid size (size %d vs. %d bytes left)\n",
+ s->block, frame_size, buf_size);
wavpack_decode_flush(avctx);
return -1;
}
--
1.8.2.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel