summaryrefslogtreecommitdiff
path: root/libavcodec/shorten.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-09-16 11:24:14 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-10-20 13:09:25 -0400
commit45d7d31fb94ded19de2bfdb064804e617c068879 (patch)
tree982b1162874f7753807a0a83589be74d97f120c2 /libavcodec/shorten.c
parenta8055992c0a15b6fc76c593c8cbee9a611ca28ff (diff)
shorten: move declaration of 'ret' to top of shorten_decode_frame()
Diffstat (limited to 'libavcodec/shorten.c')
-rw-r--r--libavcodec/shorten.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 638d886c4f..2502587604 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -382,6 +382,8 @@ static int shorten_decode_frame(AVCodecContext *avctx,
ShortenContext *s = avctx->priv_data;
int i, input_buf_size = 0;
int16_t *samples = data;
+ int ret;
+
if(s->max_framesize == 0){
void *tmp_ptr;
s->max_framesize= 1024; // should hopefully be enough for the first header
@@ -417,7 +419,6 @@ static int shorten_decode_frame(AVCodecContext *avctx,
skip_bits(&s->gb, s->bitindex);
if (!s->blocksize)
{
- int ret;
if ((ret = read_header(s)) < 0)
return ret;
*data_size = 0;
@@ -464,7 +465,6 @@ static int shorten_decode_frame(AVCodecContext *avctx,
*data_size = 0;
} else {
/* process audio command */
- int ret;
int residual_size = 0;
int channel = s->cur_chan;
int32_t coffset;