diff options
author | Alex Converse <alex.converse@gmail.com> | 2011-09-08 11:02:43 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-21 17:59:36 +0200 |
commit | 8a8aafd2b901f78a3ce02fad717482ae58ab72b7 (patch) | |
tree | c922a6faa249d023f09e4f639f1b0d1adbf70181 | |
parent | a13ef6105167032cd0ecaeb86a3727c9bf67ac95 (diff) | |
download | ffmpeg-8a8aafd2b901f78a3ce02fad717482ae58ab72b7.tar.gz |
wavpack: Check error codes rather than working around error conditions.
(cherry picked from commit dba2b63a98bdcac7bda1a8a2c48950518c075e17)
-rw-r--r-- | libavcodec/wavpack.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 1e6d857849..61a75fd765 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -1141,7 +1141,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, int16_t *dst = (int16_t*)samples + 1; int16_t *src = (int16_t*)samples; int cnt = samplecount; - while(cnt-- > 0){ + while(cnt--){ *dst = *src; src += channel_stride; dst += channel_stride; @@ -1150,7 +1150,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, int32_t *dst = (int32_t*)samples + 1; int32_t *src = (int32_t*)samples; int cnt = samplecount; - while(cnt-- > 0){ + while(cnt--){ *dst = *src; src += channel_stride; dst += channel_stride; @@ -1159,7 +1159,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, float *dst = (float*)samples + 1; float *src = (float*)samples; int cnt = samplecount; - while(cnt-- > 0){ + while(cnt--){ *dst = *src; src += channel_stride; dst += channel_stride; |