mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavf/libssh: translate a read of 0 to EOF
Yet another case of forgotten 0 =! EOF translation. While the documentation for this specific synchronous read function does not mention it, the documentation for `sftp_async_read` documents it, as well as looking at the implementation of this function leads one to find `if (handle->eof) { return 0; }`. Reported by stnutt on IRC.
This commit is contained in:
parent
81b77e7bf1
commit
26892c7615
@ -295,7 +295,7 @@ static int libssh_read(URLContext *h, unsigned char *buf, int size)
|
|||||||
av_log(libssh, AV_LOG_ERROR, "Read error.\n");
|
av_log(libssh, AV_LOG_ERROR, "Read error.\n");
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
}
|
}
|
||||||
return bytes_read;
|
return bytes_read ? bytes_read : AVERROR_EOF;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int libssh_write(URLContext *h, const unsigned char *buf, int size)
|
static int libssh_write(URLContext *h, const unsigned char *buf, int size)
|
||||||
|
Loading…
Reference in New Issue
Block a user