22 #include "libavutil/channel_layout.h"
23 #include "libavutil/intreadwrite.h"
24 #include "libavutil/dict.h"
31 #define WV_BLOCK_LIMIT 1047576
33 #define WV_EXTRA_SIZE 12
35 #define WV_START_BLOCK 0x0800
36 #define WV_END_BLOCK 0x1000
37 #define WV_SINGLE_BLOCK (WV_START_BLOCK | WV_END_BLOCK)
54 6000, 8000, 9600, 11025, 12000, 16000, 22050, 24000,
55 32000, 44100, 48000, 64000, 88200, 96000, 192000, -1
76 if (p->
buf[0] ==
'w' && p->
buf[1] ==
'v' &&
77 p->
buf[2] ==
'p' && p->
buf[3] ==
'k')
100 if (tag !=
MKTAG(
'w',
'v',
'p',
'k'))
109 if (ver < 0x402 || ver > 0x410) {
127 bpp = ((wc->
flags & 3) + 1) << 3;
140 "Cannot determine additional parameters\n");
154 "Insufficient channel information\n");
173 chan |= (
avio_r8(pb) & 0xF) << 8;
178 "Invalid channel info size %d\n", size);
193 "Cannot determine custom sampling rate\n");
209 "Bits per sample differ, this block: %i, header block: %i\n",
215 "Channels differ, this block: %i, header block: %i\n",
219 if (wc->
flags && rate != -1 && rate != wc->
rate) {
221 "Sampling rate differ, this block: %i, header block: %i\n",
258 if (wc->
samples != 0xFFFFFFFFu)
278 uint32_t block_samples;
316 if (ver < 0x402 || ver > 0x410) {
345 if (block_samples > INT32_MAX)
347 "Too many samples in block: %"PRIu32
"\n", block_samples);
356 int64_t timestamp,
int flags)
373 if (timestamp < 0 || timestamp >= s->
duration)
385 }
while(pts < timestamp);