lavf/libssh: fix seek with whence==SEEK_CUR
authorLukasz Marek <lukasz.m.luki@gmail.com>
Tue, 21 Jan 2014 00:18:15 +0000 (01:18 +0100)
committerLukasz Marek <lukasz.m.luki@gmail.com>
Tue, 21 Jan 2014 23:41:13 +0000 (00:41 +0100)
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
libavformat/libssh.c

index 8a464cd..d513df2 100644 (file)
@@ -233,7 +233,7 @@ static int64_t libssh_seek(URLContext *h, int64_t pos, int whence)
         newpos = pos;
         break;
     case SEEK_CUR:
-        newpos = sftp_tell64(libssh->file);
+        newpos = sftp_tell64(libssh->file) + pos;
         break;
     case SEEK_END:
         newpos = libssh->filesize + pos;