Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-25 03:10:27 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-12-25 03:10:27 +0400
commit5257743aee0c3982f0079e6553aabc6aa39401d2 (patch)
tree999f4ca6592e85062fefd4798c73c7f33c872912 /libavcodec/ws-snd1.c
parent0d4404ed65e6ebfdf5e3c09f9e3a2a41dde18e4a (diff)
ws_snd1: Fix wrong samples count and crash.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ws-snd1.c')
-rw-r--r--libavcodec/ws-snd1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c
index b7e28f5e56..2cb8bb44a6 100644
--- a/libavcodec/ws-snd1.c
+++ b/libavcodec/ws-snd1.c
@@ -112,8 +112,8 @@ static int ws_snd_decode_frame(AVCodecContext *avctx, void *data,
/* make sure we don't write past the output buffer */
switch (code) {
- case 0: smp = 4; break;
- case 1: smp = 2; break;
+ case 0: smp = 4*(count+1); break;
+ case 1: smp = 2*(count+1); break;
case 2: smp = (count & 0x20) ? 1 : count + 1; break;
default: smp = count + 1; break;
}