summaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-24 14:23:44 +0200
committerMartin Storsjö <martin@martin.st>2013-07-07 13:30:01 +0300
commit5d876be87a115b93dd2e644049e3ada2cfb5ccb7 (patch)
tree3535f2f7cd4111c8e5a20c53bc83d9800b0a0921 /libavformat/avio.c
parentf5e646a00ac21e500dae4bcceded790a0fbc5246 (diff)
avio: Handle AVERROR_EOF in the same way as the return value 0
This makes sure the ffurl_read_complete function actually returns the number of bytes read, as the documentation of the function says, even if the underlying protocol uses AVERROR_EOF instead of 0. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index a43b241399..ad39e6fdb0 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -238,7 +238,7 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
else
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;