29 #define MKMPCTAG(a, b) (a | (b << 8))
31 #define TAG_MPCK MKTAG('M','P','C','K')
47 static const int mpc8_rate[8] = { 44100, 48000, 37800, 32000, -1, -1, -1, -1 };
76 uint8_t *bs = p->
buf + 4;
84 while (bs < bs_end + 3) {
85 int header_found = (bs[0] ==
'S' && bs[1] ==
'H');
86 if (bs[0] <
'A' || bs[0] >
'Z' || bs[1] <
'A' || bs[1] >
'Z')
92 if (bs + size - 2 >= bs_end)
95 if (size < 11 || size > 28)
135 int64_t
size, pos, ppos[2];
151 if (size < 0 || size >= INT_MAX / 2) {
160 if(size > UINT_MAX/4 || size > c->
samples/1152){
165 for(i = 0; i < 2; i++){
170 for(; i <
size; i++){
175 pos = (t >> 1) + ppos[0]*2 - ppos[1];
286 if(index < 0)
return -1;