summaryrefslogtreecommitdiff
path: root/libavcodec/flacdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-03-05 01:23:53 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-03-05 01:23:53 +0000
commitbf1d7e285c2859dbea59ebbe30fa8f5b4f5c0b74 (patch)
tree33b2e2d0166ba6783d9a0448781c254895e0b82a /libavcodec/flacdec.c
parentfd6fd470ce47d1b68067a16120ffc87fa25ffa01 (diff)
downloadffmpeg-bf1d7e285c2859dbea59ebbe30fa8f5b4f5c0b74.tar.gz
flacdec: cosmetics: move 2 statements to immediately after frame
decoding. Originally committed as revision 17819 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r--libavcodec/flacdec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 893eab5705..5d8b834efc 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -683,6 +683,8 @@ static int flac_decode_frame(AVCodecContext *avctx,
s->bitstream_index=0;
return -1;
}
+ *data_size = s->blocksize * s->channels * (s->is32 ? 4 : 2);
+ bytes_read = (get_bits_count(&s->gb)+7)/8;
#define DECORRELATE(left, right)\
assert(s->channels == 2);\
@@ -718,9 +720,6 @@ static int flac_decode_frame(AVCodecContext *avctx,
DECORRELATE( (a-=b>>1) + b, a)
}
- *data_size = s->blocksize * s->channels * (s->is32 ? 4 : 2);
-
- bytes_read = (get_bits_count(&s->gb)+7)/8;
end:
if (bytes_read > buf_size) {
av_log(s->avctx, AV_LOG_ERROR, "overread: %d\n", bytes_read - buf_size);