13 char *buf = ogg_sync_buffer(&osy, 4096);
14 int len = read(0, buf, 4096);
17 fprintf(stderr, "read error: %m\n");
22 ogg_sync_wrote(&osy, len);
26 while (ok = ogg_sync_pageout(&osy, &opg))
29 fprintf(stderr, "Skipping...\n");
32 fprintf(stderr, "Page (v=%d, stream=%x, bos=%d, eos=%d, pos=%Ld, pgno=%d)\n",
33 ogg_page_version(&opg),
34 ogg_page_serialno(&opg),
37 (unsigned long long) ogg_page_granulepos(&opg),
38 (unsigned int) ogg_page_pageno(&opg));
42 fprintf(stderr, "Done.\n");