/* Check for a restart marker & resynchronize decoder. Returns FALSE if must suspend.  */
process_restart(j_decompress_ptr cinfo)
/* Check for a restart marker & resynchronize decoder. Returns FALSE if must suspend.  */
process_restart(j_decompress_ptr cinfo)
{
  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
  int ci;
  finish_pass_huff(cinfo);
  if (! (*cinfo->marker->read_restart_marker) (cinfo))
    return FALSE;
  for (ci = 0; ci < cinfo->comps_in_scan; ci++)
    entropy->saved.last_dc_val[ci] = 0;
  entropy->saved.EOBRUN = 0;
  entropy->restarts_to_go = cinfo->restart_interval;
  if (cinfo->unread_marker == 0)
    entropy->insufficient_data = FALSE;
  return TRUE;
}