blob: a5c11769c9cc606ba93b5b37ef3c131572e5e2c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
$NetBSD: patch-ag,v 1.1 2005/08/27 06:59:52 dogcow Exp $
--- libmpcodecs/ad_pcm.c 2005/07/28 13:43:24 1.18
+++ libmpcodecs/ad_pcm.c 2005/08/25 19:46:20 1.19
@@ -98,8 +98,8 @@
static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
{
- int len=sh_audio->channels*sh_audio->samplesize-1;
- len=(minlen+len)&(~len); // sample align
+ unsigned len = sh_audio->channels*sh_audio->samplesize;
+ len = maxlen - maxlen % len; // sample align
len=demux_read_data(sh_audio->ds,buf,len);
return len;
}
|