avformat/avio: Fix EOF handiling of ffurl_read_complete()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 24 Jun 2013 12:23:44 +0000 (14:23 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 24 Jun 2013 12:23:44 +0000 (14:23 +0200)
Fixes Ticket2537

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

index f6af0cb..73b2a29 100644 (file)
@@ -290,7 +290,7 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
                 av_usleep(1000);
             }
         } else if (ret < 1)
-            return ret < 0 ? ret : len;
+            return (ret < 0 && ret != AVERROR_EOF) ? ret : len;
         if (ret)
            fast_retries = FFMAX(fast_retries, 2);
         len += ret;