/* Writers of suspendable-input applications must note that skip_input_data is not granted the right to give a suspension return. If the skip extends beyond the data currently in the buffer, the buffer can be marked empty so that the next read will cause a fill_input_buffer call that can suspend. Arranging for additional bytes to be discarded before reloading the input buffer is the application writer's problem.  */
skip_input_data(j_decompress_ptr cinfo, long num_bytes)
/* Writers of suspendable-input applications must note that skip_input_data is not granted the right to give a suspension return. If the skip extends beyond the data currently in the buffer, the buffer can be marked empty so that the next read will cause a fill_input_buffer call that can suspend. Arranging for additional bytes to be discarded before reloading the input buffer is the application writer's problem.  */
skip_input_data(j_decompress_ptr cinfo, long num_bytes)
{
  struct jpeg_source_mgr * src = cinfo->src;
  size_t nbytes;
  if (num_bytes > 0) {
    nbytes = (size_t) num_bytes;
    while (nbytes > src->bytes_in_buffer) {
      nbytes -= src->bytes_in_buffer;
      (void) (*src->fill_input_buffer) (cinfo);
    }
    src->next_input_byte += nbytes;
    src->bytes_in_buffer -= nbytes;
  }
}