udp: return the error code instead of generic EIO.
authorNicolas George <nicolas.george@normalesup.org>
Thu, 15 Mar 2012 12:42:34 +0000 (13:42 +0100)
committerNicolas George <nicolas.george@normalesup.org>
Thu, 22 Mar 2012 16:36:23 +0000 (17:36 +0100)
libavformat/udp.c

index 4a6cee2..5ffe6d1 100644 (file)
@@ -342,7 +342,7 @@ static void *circular_buffer_task( void *_URLContext)
         pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancelstate);
         if (len < 0) {
             if (ff_neterrno() != AVERROR(EAGAIN) && ff_neterrno() != AVERROR(EINTR)) {
-                s->circular_buffer_error = AVERROR(EIO);
+                s->circular_buffer_error = ff_neterrno();
                 goto end;
             }
             continue;