diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-06-24 16:23:44 +0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-07-07 14:30:01 +0400 |
commit | 5d876be87a115b93dd2e644049e3ada2cfb5ccb7 (patch) | |
tree | 3535f2f7cd4111c8e5a20c53bc83d9800b0a0921 /libavformat/avio.c | |
parent | f5e646a00ac21e500dae4bcceded790a0fbc5246 (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.c | 2 |
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; |