mirror of https://git.ffmpeg.org/ffmpeg.git
udp: support non blocking reads with fifo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bc900501e0
commit
9f50dafe90
|
@ -572,6 +572,9 @@ static int udp_read(URLContext *h, uint8_t *buf, int size)
|
|||
} else if(s->circular_buffer_error){
|
||||
pthread_mutex_unlock(&s->mutex);
|
||||
return s->circular_buffer_error;
|
||||
} else if(h->flags & AVIO_FLAG_NONBLOCK) {
|
||||
pthread_mutex_unlock(&s->mutex);
|
||||
return AVERROR(EAGAIN);
|
||||
}
|
||||
else {
|
||||
pthread_cond_wait(&s->cond, &s->mutex);
|
||||
|
|
Loading…
Reference in New Issue