1<html>
2
3<head>
4<title>libogg - function - ogg_stream_flush</title>
5<link rel=stylesheet href="style.css" type="text/css">
6</head>
7
8<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9<table border=0 width=100%>
10<tr>
11<td><p class=tiny>libogg documentation</p></td>
12<td align=right><p class=tiny>libogg release 1.2.0 - 20100325</p></td>
13</tr>
14</table>
15
16<h1>ogg_stream_flush</h1>
17
18<p><i>declared in "ogg/ogg.h";</i></p>
19
20<p>This function checks for remaining packets inside the stream and forces remaining packets into a page, regardless of the size of the page.
21<p>This should only be used when you want to flush an undersized page from the middle of the stream.  Otherwise, <a href="ogg_stream_pageout.html">ogg_stream_pageout</a> should always be used.  
22<p>This function can be used to verify that all packets have been flushed.  If the return value is 0, all packets have been placed into a page.
23
24<br><br>
25<table border=0 color=black cellspacing=0 cellpadding=7>
26<tr bgcolor=#cccccc>
27	<td>
28<pre><b>
29int ogg_stream_flush(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og);
30</b></pre>
31	</td>
32</tr>
33</table>
34
35<h3>Parameters</h3>
36<dl>
37<dt><i>os</i></dt>
38<dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct, which represents the current logical bitstream.</dd>
39<dt><i>og</i></dt>
40<dd>Pointer to a page of data.  The remaining packets in the stream will be placed into this page, if any remain.
41</dl>
42
43
44<h3>Return Values</h3>
45<blockquote>
46<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 <a href="ogg_stream_state.html">ogg_stream_state</a> that has been cleared explicitly or implicitly due to an internal error.</li>
47<li>
48Nonzero means that remaining packets have successfully been flushed into the page.</li>
49</blockquote>
50<p>
51
52<br><br>
53<hr noshade>
54<table border=0 width=100%>
55<tr valign=top>
56<td><p class=tiny>copyright &copy; 2000-2010 Xiph.Org</p></td>
57<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
58</tr><tr>
59<td><p class=tiny>libogg documentation</p></td>
60<td align=right><p class=tiny>libogg release 1.2.0 - 20100325</p></td>
61</tr>
62</table>
63
64
65</body>
66
67</html>
68