aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/truespeech.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-10-13 00:21:17 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-10-13 16:26:00 -0400
commit6d55506c8bbe9f7b4dba244d40519832eff66c9b (patch)
treea64e1db1a47935490e8395dfa20b388393e5323a /libavcodec/truespeech.c
parentb84048935ec423a0c2063ffaed69b44059d0ca98 (diff)
downloadffmpeg-6d55506c8bbe9f7b4dba244d40519832eff66c9b.tar.gz
truespeech: remove unneeded variable, 'consumed'
increment the 'buf' pointer instead, and consume the whole packet.
Diffstat (limited to 'libavcodec/truespeech.c')
-rw-r--r--libavcodec/truespeech.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index c48a9c1769..72d828a9cb 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -310,7 +310,6 @@ static int truespeech_decode_frame(AVCodecContext *avctx,
int i, j;
short *samples = data;
- int consumed = 0;
int iterations, out_size;
iterations = buf_size / 32;
@@ -330,8 +329,8 @@ static int truespeech_decode_frame(AVCodecContext *avctx,
memset(samples, 0, out_size);
for(j = 0; j < iterations; j++) {
- truespeech_read_frame(c, buf + consumed);
- consumed += 32;
+ truespeech_read_frame(c, buf);
+ buf += 32;
truespeech_correlate_filter(c);
truespeech_filters_merge(c);
@@ -349,7 +348,7 @@ static int truespeech_decode_frame(AVCodecContext *avctx,
*data_size = out_size;
- return consumed;
+ return buf_size;
}
AVCodec ff_truespeech_decoder = {