libogg documentation | libogg release 1.1.4 - 20090520

# ogg_stream_init

declared in "ogg/ogg.h";

This function is used to initialize an ogg_stream_state struct and allocates appropriate memory in preparation for encoding or decoding.

It also assigns the stream a given serial number.

    int ogg_stream_init(ogg_stream_state *os,int serialno);

### Parameters

os
  Pointer to the ogg_stream_state struct that we will be initializing.
serialno
  Serial number that we will attach to this stream.

### Return Values

> - 0 if successful
> - -1 if unsuccessful.

copyright © 2000-2009 Xiph.Org | Ogg Container Format
libogg documentation | libogg release 1.1.4 - 20090520