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++) {
671 for (i = 0; i < ogg->
nstreams; i++) {
679 "Headers mismatch for stream %d: "
680 "expected %d received %d.\n",
753 int64_t fpos, pts, dts;
763 ret =
ogg_packet(s, &idx, &pstart, &psize, &fpos);
766 }
while (idx < 0 || !s->streams[idx]);
784 memcpy(pkt->
data, os->
buf + pstart, psize);
796 if(side_data == NULL) {
818 int64_t *pos_arg, int64_t pos_limit)
830 && !
ogg_packet(s, &i, &pstart, &psize, pos_arg)) {
831 if (i == stream_index) {
859 int64_t timestamp,
int flags)
877 os = ogg->
streams + stream_index;
885 if (!memcmp(
"OggS", p->
buf, 5) && p->
buf[5] <= 0x7)
893 .priv_data_size =
sizeof(
struct ogg),