Fix offset calculation for signed linear (bug #4433)
authorMark Spencer <markster@digium.com>
Thu, 2 Jun 2005 17:54:09 +0000 (17:54 +0000)
committerMark Spencer <markster@digium.com>
Thu, 2 Jun 2005 17:54:09 +0000 (17:54 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5815 65c4cc65-6c06-0410-ace0-fbb531ad65f3

formats/format_sln.c

index d5c562a..0ae19af 100755 (executable)
@@ -156,6 +156,7 @@ static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whenc
        off_t offset=0,min,cur,max;
 
        min = 0;
+       sample_offset <<= 1;
        cur = lseek(fs->fd, 0, SEEK_CUR);
        max = lseek(fs->fd, 0, SEEK_END);
        if (whence == SEEK_SET)