return;
btr_merge(btrn, fn->min_iqs);
len = btr_next_buffer(btrn, (char **)&inbuf);
- len = PARA_MAX(len, (size_t)8192);
+ len = PARA_MIN(len, (size_t)8192);
consumed = 0;
iqs = btr_get_input_queue_size(btrn);
if (!padd->initialized) {
padd->frame_info.bytesconsumed);
PARA_ERROR_LOG("%s\n", NeAACDecGetErrorMessage(
padd->frame_info.error));
- consumed++; /* catch 21 */
+ if (consumed < len)
+ consumed++; /* catch 21 */
goto success;
}
padd->error_count = 0;
if (ret < 0)
goto err;
wn->min_iqs = pad->bytes_per_frame;
+ goto again;
}
frames = bytes / pad->bytes_per_frame;
frames = snd_pcm_writei(pad->handle, data, frames);
numbytes -= br->btrb->size - br->consumed;
btr_drop_buffer_reference(br);
}
- assert(true);
+ assert(false);
}
/*
* We have a wrap buffer, consume from it. If in total, i.e. including
* Accept a connection on the socket this server is listening on.
*
* \param ss The sender whose listening fd is ready for reading.
+ * \param rfds Passed to para_accept(),
*
* This must be called only if the socket fd of \a ss is ready for reading. It
* calls para_accept() to accept the connection and performs the following