/* The function is used to wait JPEG engine, until JPEG engine not busy.  */
static INT _jpegWait(void)
/* The function is used to wait JPEG engine, until JPEG engine not busy.  */
static INT _jpegWait(void)
{
    while (1)
    {
        if (g_bWait == FALSE)
            break;
    }
    if (g_jpegError)
        return E_FAIL;
    return E_SUCCESS;
}