Browse Source

ws_snd1: Fix wrong samples count and crash.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5257743aee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9.1
Michael Niedermayer 14 years ago
parent
commit
49db360005
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/ws-snd1.c

+ 2
- 2
libavcodec/ws-snd1.c View File

@@ -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;
}


Loading…
Cancel
Save