[Vorbis-dev] ogg encoding

Ralph Giles giles at xiph.org
Wed Jun 7 17:17:34 PDT 2006

On Wed, Jun 07, 2006 at 06:21:23PM -0400, Stephen Whiters-Ridley wrote:
> I was wondering. When doing ogg only encoding, how do you mark end of
> stream? I am setting ogg_packet.e_o_s and then submitting it via
> ogg_stream_packetin() and then, because
> its the last potential page ogg_stream_flush()ing it. But when I walk
> through the file, EOS is not set on that logical bitstream.

That sounds about right. Of course with the encoders, you pass 'last=1' 
when you submit the last bit of uncompressed data and it should set the 
eos flag in the ogg_packet structure itself.

One idea: are you looping over your ogg_stream_flush() in case it has 
multiple pages of data to return. That might explian why you're not 
seeing the flag, especially if you also forgot to loop on 
ogg_stream_pageout(). :-)


More information about the Vorbis-dev mailing list