예제 #1
0
/*
 * D_IF_init
 *
 * Parameters:
 *
 * Function:
 *    Allocates state memory and initializes state memory
 *
 * Returns:
 *    pointer to encoder interface structure
 */
void *D_IF_init( void)
{
   WB_dec_if_state *s = NULL;

   /* allocate memory */
   if ((s = (WB_dec_if_state*)malloc(sizeof(WB_dec_if_state))) == NULL)
   {
      return NULL;
   }

   D_MAIN_init(&(s->decoder_state));
   if (s->decoder_state == NULL)
   {
      free(s);
      return NULL;
   }

   D_IF_reset(s);

   return (void *)s;
}
예제 #2
0
파일: amrwb.c 프로젝트: BigHNF/tcpmp-revive
static int Flush(amrwb* p)
{
	if (p->Decoder)
		D_IF_reset(p->Decoder);
	return ERR_NONE;
}