Aha ! Solved it, it was a single line of code:<br><br>while (ogg_stream_packet_out() && !frame_out) {<br> ..<br>}<br><br>should have been:<br><br>while (!frame_out && ogg_stream_packet_out() ) {<br><br>...<br>
<br>}<br><br><br>Doh !<br><br>:-)<br><br><br>Gabriel.<br><br><br><br><div class="gmail_quote">On Tue, Nov 11, 2008 at 10:31 AM, salsaman <span dir="ltr"><<a href="mailto:salsaman@gmail.com">salsaman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Tue, Nov 11, 2008 at 5:10 AM, salsaman <span dir="ltr"><<a href="mailto:salsaman@gmail.com" target="_blank">salsaman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div><br><br><div class="gmail_quote">On Tue, Nov 11, 2008 at 4:48 AM, Ralph Giles <span dir="ltr"><<a href="mailto:giles@xiph.org" target="_blank">giles@xiph.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On 10-Nov-08, at 11:30 PM, salsaman wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
get page at 1773554<br>
got packet<br>
frame++, skip is 0<br>
frame decoded<br>
page processed, kframe=444 : offs=444<br>
</blockquote>
<br></div>
Why doesn't offs reset to zero here?<br><font color="#888888">
<br>
-r<br>
</font></blockquote></div><br><br></div></div>My mistake - it actually outputs the frame number rather than the offset.<br>Subtract kframe from offs to get the real offset.<br><br>Gabriel.<br><br>
</blockquote></div><br><br></div></div>Now I am not so sure this has anything to do with the audio packets (although that may be a problem too).<br><br>What I am seeing in another file is, for example:<br><br>first set of pages decodes to 5 frames (last granulepos is 1,5)<br>
<br>- decoding in sequence without returning anything results in 5 packets being decoded - good<br><br>- decoding in sequence, returning a frame each time and then re-entering the plugin to get the next frame results in only 3 packets being decoded<br>
<br>I don't understand this at all, because after returning the processing continues where it left off, with ogg_stream_packetout(), using the same stream data...<br><br>Gabriel.<br><br>
</blockquote></div><br>