[Vorbis-dev] ogg encoding

Stephen Whiters-Ridley s7ephen at gmail.com
Wed Jun 7 21:22:51 PDT 2006


I guess my ultimate question is: Do you indicate the end-of-stream by just
setting ogg_packet = 1 and then ogg_stream_packetin(ogg_packet)?
Isnt the API internally supposed to use the packet's EOS flag to set it
internally in the page and stream_state? I made sure I was looping on the
flush and the pageout (even though the code around it insured they were
unique) and I still get the EOS flag missing in the bitstream.

On 6/7/06, Ralph Giles <giles at xiph.org> wrote:
>
> 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(). :-)
>
> FWIW,
> -r
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20060608/7bcae1a7/attachment.html


More information about the Vorbis-dev mailing list