return 1;
}
if (packet_num == 1) {
- PARA_INFO_LOG("replacing metadata packet\n");
ogg_packet replacement = *packet;
+ PARA_INFO_LOG("replacing metadata packet\n");
replacement.packet = dummy_packet;
replacement.bytes = sizeof(dummy_packet);
ret = ogg_stream_packetin(&vghd->os, &replacement);
ret = -E_OGG_PACKET_IN;
if (ogg_stream_packetin(&vghd->os, packet) < 0)
goto out;
- ret = -E_OGG_STREAM_FLUSH;
- if (ogg_stream_flush(&vghd->os, &og) == 0)
- goto out;
- add_ogg_page(&og, vghd);
+ while (ogg_stream_flush(&vghd->os, &og))
+ add_ogg_page(&og, vghd);
ret = 0;
out:
ogg_stream_clear(&vghd->os);