lavf/libssh: read empty path from url as /

Reviewed-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Mariusz Szczepańczyk 2015-06-23 03:04:20 +02:00 committed by Michael Niedermayer
parent e96f0a692b
commit 0cce94fb10

View File

@ -204,6 +204,9 @@ static av_cold int libssh_connect(URLContext *h, const char *url, char *path, si
path, path_size,
url);
if (!(*path))
av_strlcpy(path, "/", path_size);
// a port of 0 will use a port from ~/.ssh/config or the default value 22
if (port < 0 || port > 65535)
port = 0;