libogg documentation

libogg release 1.3.5 - 20210603

ogg_sync_check

declared in "ogg/ogg.h";

This function is used to check the error or readiness condition of an ogg_sync_state structure.

It is safe practice to ignore unrecoverable errors (such as an internal error caused by a malloc() failure) returned by ogg stream synchronization calls. Should an internal error occur, the ogg_sync_state structure will be cleared (equivalent to a call to ogg_sync_clear) and subsequent calls using this ogg_sync_state will be noops. Error detection is then handled via a single call to ogg_sync_check at the end of the operational block.




int ogg_sync_check(ogg_sync_state *oy);

Parameters

oy
Pointer to a previously declared ogg_sync_state struct.

Return Values

  • 0 is returned if the ogg_sync_state structure is initialized and ready.
  • nonzero is returned if the structure was never initialized, or if an unrecoverable internal error occurred in a previous call using the passed in ogg_sync_state struct.



  • copyright © 2000-2021 Xiph.Org Foundation

    Ogg Container Format

    libogg documentation

    libogg release 1.3.5 - 20210603