mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-03 02:58:02 +00:00
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>
(cherry picked from commit 5d876be87a
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
fa6eef4210
commit
002ca3e099
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user