<p>This should only be used when you want to flush an undersized page from the middle of the stream. Otherwise, <ahref="ogg_stream_pageout.html">ogg_stream_pageout</a> or <ahref="ogg_stream_pageout_fill.html">ogg_stream_pageout_fill</a> should always be used.
<p>This function can also be used to verify that all packets have been flushed. If the return value is 0, all packets have been placed into a page. Like <ahref="ogg_stream_pageout.html">ogg_stream_pageout</a>, it should generally be called in a loop until available packet data has been flushes, since even a single packet may span multiple pages.
int ogg_stream_flush(<ahref="ogg_stream_state.html">ogg_stream_state</a> *os, <ahref="ogg_page.html">ogg_page</a> *og);
</b></pre>
</td>
</tr>
</table>
<h3>Parameters</h3>
<dl>
<dt><i>os</i></dt>
<dd>Pointer to a previously declared <ahref="ogg_stream_state.html">ogg_stream_state</a> struct, which represents the current logical bitstream.</dd>
<dt><i>og</i></dt>
<dd>Pointer to a page of data. The remaining packets in the stream will be placed into this page, if any remain.
</dl>
<h3>Return Values</h3>
<blockquote>
<li>0 means that all packet data has already been flushed into pages, and there are no packets to put into the page. 0 is also returned in the case of an <ahref="ogg_stream_state.html">ogg_stream_state</a> that has been cleared explicitly or implicitly due to an internal error.</li>
<li>
Nonzero means that remaining packets have successfully been flushed into the page.</li>