[Vorbis-dev] ogg_packet -> ogg_page

Christoph Rupp crupp at umc-web.de
Mon Oct 18 07:52:20 PDT 2004


hi,

in my quest to grok ogg i tried to write a small program which extracts 
ogg_packets, and stuffs them back into ogg pages (which are then written 
to a file).

extracting the packets works fine, but i have problems stuffing them 
into a new ogg stream.

pseudo code:
	
	ogg_stream_init(os, serialno)
	
	foreach p in packets:
		ogg_stream_packetin(os, p)

		// try to extract a page
		ogg_stream_pageout(os, og)

ogg_stream_pageout() always seems to return a valid ogg page - however, 
it does "return" the page, but it does not "extract" the page from the 
stream - if i call ogg_stream_pageout() more then once, i always get the 
same ogg_page.

replacing ogg_stream_pageout() with ogg_stream_flush() got the same results.

what is the proper way of creating an ogg_page?

Thank you very much,
Chris


More information about the Vorbis-dev mailing list