38 #define MAX_PAGE_SIZE 65307
39 #define DECODER_BUFFER_SIZE MAX_PAGE_SIZE
75 for (i = 0; i < ogg->
nstreams; i++) {
131 for (i = 0; i < ogg->
nstreams; i++) {
145 if (start_pos <= s->data_offset) {
160 for (i = 0; ogg_codecs[i]; i++)
163 return ogg_codecs[i];
200 memset(os, 0,
sizeof(*os));
220 "in between Ogg context save/restore operations.\n");
230 memset(os, 0,
sizeof(*os));
300 if (sync[sp & 3] ==
'O' &&
301 sync[(sp + 1) & 3] ==
'g' &&
302 sync[(sp + 2) & 3] ==
'g' && sync[(sp + 3) & 3] ==
'S')
363 for (i = 0; i <
nsegs; i++)
442 av_dlog(s,
"ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d\n",
470 if (!complete && os->
segp == os->
nsegs) {
483 "Page at %"PRId64
" is missing granule\n",
505 for (i = 0; i < ogg->
nstreams; i++) {
620 for (i = 0; i < ogg->
nstreams; i++) {
649 for (i = 0; i < ogg->
nstreams; i++) {
718 int64_t fpos, pts, dts;
723 ret =
ogg_packet(s, &idx, &pstart, &psize, &fpos);
726 }
while (idx < 0 || !s->streams[idx]);
744 memcpy(pkt->
data, os->
buf + pstart, psize);
756 int64_t *pos_arg, int64_t pos_limit)
768 && !
ogg_packet(s, &i, &pstart, &psize, pos_arg)) {
769 if (i == stream_index) {
792 int64_t timestamp,
int flags)
810 os = ogg->
streams + stream_index;
818 if (!memcmp(
"OggS", p->
buf, 5) && p->
buf[5] <= 0x7)
826 .priv_data_size =
sizeof(
struct ogg),