libvorbis documentation | libvorbis version 1.3.2 - 20101101

# vorbis_bitrate_flushpacket

declared in "vorbis/codec.h";

This function returns the next available completed packet from the bitrate management engine. It should be called in a loop after any call to vorbis_bitrate_addblock() until it returns either 0 (more data needed) or a negative value (error).

The data returned in the ogg_packet structure can be copied to the final compressed output stream.

    extern int      vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,
                                               ogg_packet *op);

### Parameters

vd
  Pointer to the vorbis_dsp_state represending the encoder.
op
  Pointer to an ogg_packet to be filled out with the compressed data.

### Return Values

- 1 for success when more packets are available.
- 0 for success when this is the last packet available from the current input.
- negative values for failure:
  - OV_EINVAL - Invalid parameters.
  - OV_EFAULT - Internal fault; indicates a bug or memory corruption.
  - OV_EIMPL - Unimplemented; not supported by this version of the library.

copyright © 2010 Xiph.Org | Ogg Vorbis
libvorbis documentation | libvorbis version 1.3.2 - 20101101