The comment seemed to indicate that left was used
to limit the size of the recv, but it was not so.
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancelstate);
ff_socket_nonblock(s->udp_fd, 0);
while(1) {
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancelstate);
ff_socket_nonblock(s->udp_fd, 0);
while(1) {
- /* How much do we have left to the end of the buffer */
- /* Whats the minimum we can read so that we dont comletely fill the buffer */
- left = av_fifo_space(s->fifo);
-
/* Blocking operations are always cancellation points;
see "General Information" / "Thread Cancelation Overview"
in Single Unix. */
/* Blocking operations are always cancellation points;
see "General Information" / "Thread Cancelation Overview"
in Single Unix. */
continue;
}
AV_WL32(s->tmp, len);
continue;
}
AV_WL32(s->tmp, len);
+
+ if(av_fifo_space(s->fifo) < len + 4) {
/* No Space left */
if (s->overrun_nonfatal) {
av_log(h, AV_LOG_WARNING, "Circular buffer overrun. "
/* No Space left */
if (s->overrun_nonfatal) {
av_log(h, AV_LOG_WARNING, "Circular buffer overrun. "