History

udp: support non blocking reads with fifo

Michael Niedermayer committed 14 years ago

Commit 9f50daf1 parent bc900501 file · +3 −0Browse files

Unified · Split

libavformat/udp.c+3−0
@@ -572,6 +572,9 @@ static int udp_read(URLContext *h, uint8_t *buf, int size) · 571 unmodified lines
572572 } else if(s->circular_buffer_error){
573573 pthread_mutex_unlock(&s->mutex);
574574 return s->circular_buffer_error;
575+ } else if(h->flags & AVIO_FLAG_NONBLOCK) {
576+ pthread_mutex_unlock(&s->mutex);
577+ return AVERROR(EAGAIN);
575578 }
576579 else {
577580 pthread_cond_wait(&s->cond, &s->mutex);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t