mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-03 18:37:46 +00:00
lavf/libssh: fix seek to nagative position
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
This commit is contained in:
parent
fbf98375e4
commit
0025f13005
1 changed files with 5 additions and 0 deletions
|
@ -243,6 +243,11 @@ static int64_t libssh_seek(URLContext *h, int64_t pos, int whence)
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newpos < 0) {
|
||||||
|
av_log(h, AV_LOG_ERROR, "Seeking to nagative position.\n");
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
if (sftp_seek64(libssh->file, newpos)) {
|
if (sftp_seek64(libssh->file, newpos)) {
|
||||||
av_log(h, AV_LOG_ERROR, "Error during seeking.\n");
|
av_log(h, AV_LOG_ERROR, "Error during seeking.\n");
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue