udp: return circular buffer error if such error happened.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 23 Dec 2011 00:41:15 +0000 (01:41 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jan 2012 21:26:06 +0000 (22:26 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3dcbafc777513621e423c2f23b1725559230383d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/udp.c

index a0d127c..5eb6cd1 100644 (file)
@@ -556,6 +556,8 @@ static int udp_read(URLContext *h, uint8_t *buf, int size)
                 av_fifo_generic_read(s->fifo, buf, avail, NULL);
                 av_fifo_drain(s->fifo, AV_RL32(tmp) - avail);
                 return avail;
+            } else if(s->circular_buffer_error){
+                return s->circular_buffer_error;
             }
             else {
                 FD_ZERO(&rfds);