39 #define MAX_PAGE_SIZE 65307
40 #define DECODER_BUFFER_SIZE MAX_PAGE_SIZE
76 for (i = 0; i < ogg->
nstreams; i++) {
128 for (i = 0; i < ogg->
nstreams; i++) {
142 if (start_pos <= s->data_offset) {
157 for (i = 0; ogg_codecs[i]; i++)
160 return ogg_codecs[i];
188 for (i = 0; i < ogg->
nstreams; i++) {
214 memset(os, 0,
sizeof(*os));
235 "in between Ogg context save/restore operations.\n");
245 memset(os, 0,
sizeof(*os));
315 if (sync[sp & 3] ==
'O' &&
316 sync[(sp + 1) & 3] ==
'g' &&
317 sync[(sp + 2) & 3] ==
'g' && sync[(sp + 3) & 3] ==
'S')
378 for (i = 0; i <
nsegs; i++)
457 av_dlog(s,
"ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d\n",
485 if (!complete && os->
segp == os->
nsegs) {
498 "Page at %"PRId64
" is missing granule\n",
520 for (i = 0; i < ogg->
nstreams; i++) {
612 while (streams_left > 0 && !
ogg_packet(s, &i, NULL, NULL, NULL)) {
635 for (i = 0; i < ogg->
nstreams; i++) {
664 for (i = 0; i < ogg->
nstreams; i++) {
672 "Headers mismatch for stream %d: "
673 "expected %d received %d.\n",
738 int64_t fpos, pts, dts;
748 ret =
ogg_packet(s, &idx, &pstart, &psize, &fpos);
751 }
while (idx < 0 || !s->streams[idx]);
769 memcpy(pkt->
data, os->
buf + pstart, psize);
781 if(side_data == NULL) {
793 int64_t *pos_arg, int64_t pos_limit)
805 && !
ogg_packet(s, &i, &pstart, &psize, pos_arg)) {
806 if (i == stream_index) {
834 int64_t timestamp,
int flags)
852 os = ogg->
streams + stream_index;
860 if (!memcmp(
"OggS", p->
buf, 5) && p->
buf[5] <= 0x7)
868 .priv_data_size =
sizeof(
struct ogg),