Unified · Split
| @@ -572,6 +572,9 @@ static int udp_read(URLContext *h, uint8_t *buf, int size) · 571 unmodified lines | ||
| 572 | 572 | } else if(s->circular_buffer_error){ |
| 573 | 573 | pthread_mutex_unlock(&s->mutex); |
| 574 | 574 | return s->circular_buffer_error; |
| 575 | + } else if(h->flags & AVIO_FLAG_NONBLOCK) { | |
| 576 | + pthread_mutex_unlock(&s->mutex); | |
| 577 | + return AVERROR(EAGAIN); | |
| 575 | 578 | } |
| 576 | 579 | else { |
| 577 | 580 | pthread_cond_wait(&s->cond, &s->mutex); |