Logo Search packages:      
Sourcecode: libtheora version File versions  Download package

void theora_clear ( theora_state t  ) 

Free all internal data associated with a theora_state handle.

Parameters:
t A theora_state handle.

Definition at line 85 of file toplevel.c.

References PB_INSTANCE::info, theora_state::internal_decode, theora_state::internal_encode, theora_clear(), and theora_info_clear().

Referenced by theora_clear().

                                  {
  if(t){
    CP_INSTANCE *cpi=(CP_INSTANCE *)(t->internal_encode);
    PB_INSTANCE *pbi=(PB_INSTANCE *)(t->internal_decode);

    if (cpi) theora_encoder_clear (cpi);

    if(pbi){

      theora_info_clear(&pbi->info);
      ClearHuffmanSet(pbi);
      ClearFragmentInfo(pbi);
      ClearFrameInfo(pbi);
      ClearPBInstance(pbi);

      _ogg_free(t->internal_decode);
    }

    t->internal_encode=NULL;
    t->internal_decode=NULL;
  }
}


Generated by  Doxygen 1.6.0   Back to index