39 #define MAX_PAGE_SIZE 65307
40 #define DECODER_BUFFER_SIZE MAX_PAGE_SIZE
77 for (i = 0; i < ogg->
nstreams; i++) {
131 for (i = 0; i < ogg->
nstreams; i++) {
145 if (start_pos <= s->data_offset) {
163 for (i = 0; ogg_codecs[i]; i++)
166 return ogg_codecs[i];
194 for (i = 0; i < ogg->
nstreams; i++) {
220 memset(os, 0,
sizeof(*os));
241 "in between Ogg context save/restore operations.\n");
251 memset(os, 0,
sizeof(*os));
321 if (sync[sp & 3] ==
'O' &&
322 sync[(sp + 1) & 3] ==
'g' &&
323 sync[(sp + 2) & 3] ==
'g' && sync[(sp + 3) & 3] ==
'S')
384 for (i = 0; i <
nsegs; i++)
463 av_dlog(s,
"ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d\n",
491 if (!complete && os->
segp == os->
nsegs) {
504 "Page at %"PRId64
" is missing granule\n",
526 for (i = 0; i < ogg->
nstreams; i++) {
618 while (streams_left > 0 && !
ogg_packet(s, &i, NULL, NULL, NULL)) {
641 for (i = 0; i < ogg->
nstreams; i++) {
674 for (i = 0; i < ogg->
nstreams; i++) {
682 "Headers mismatch for stream %d: "
683 "expected %d received %d.\n",
756 int64_t fpos, pts, dts;
766 ret =
ogg_packet(s, &idx, &pstart, &psize, &fpos);
769 }
while (idx < 0 || !s->streams[idx]);
787 memcpy(pkt->
data, os->
buf + pstart, psize);
824 int64_t *pos_arg, int64_t pos_limit)
836 && !
ogg_packet(s, &i, &pstart, &psize, pos_arg)) {
837 if (i == stream_index) {
865 int64_t timestamp,
int flags)
883 os = ogg->
streams + stream_index;
891 if (!memcmp(
"OggS", p->
buf, 5) && p->
buf[5] <= 0x7)
899 .priv_data_size =
sizeof(
struct ogg),