mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ws_snd1: Fix wrong samples count and crash.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0d4404ed65
commit
5257743aee
@ -112,8 +112,8 @@ static int ws_snd_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
|
|
||||||
/* make sure we don't write past the output buffer */
|
/* make sure we don't write past the output buffer */
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 0: smp = 4; break;
|
case 0: smp = 4*(count+1); break;
|
||||||
case 1: smp = 2; break;
|
case 1: smp = 2*(count+1); break;
|
||||||
case 2: smp = (count & 0x20) ? 1 : count + 1; break;
|
case 2: smp = (count & 0x20) ? 1 : count + 1; break;
|
||||||
default: smp = count + 1; break;
|
default: smp = count + 1; break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user