| 156 | } |
| 157 | |
| 158 | static av_cold void libssh_stat_file(LIBSSHContext *libssh) |
| 159 | { |
| 160 | sftp_attributes stat; |
| 161 | |
| 162 | if (!(stat = sftp_fstat(libssh->file))) { |
| 163 | av_log(libssh, AV_LOG_WARNING, "Cannot stat remote file.\n"); |
| 164 | libssh->filesize = -1; |
| 165 | } else { |
| 166 | libssh->filesize = stat->size; |
| 167 | sftp_attributes_free(stat); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | static av_cold int libssh_close(URLContext *h) |
| 172 | { |