From: Russell Bryant Date: Tue, 14 Jun 2005 20:49:33 +0000 (+0000) Subject: Fix offset calculation for signed linear (bug #4433) X-Git-Tag: 1.0.11.1~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f1e96c0b60323d1ac9fd1cf16f861ad760f421f;p=thirdparty%2Fasterisk.git Fix offset calculation for signed linear (bug #4433) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5912 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/formats/format_sln.c b/formats/format_sln.c index 7e77876b27..224054775b 100755 --- a/formats/format_sln.c +++ b/formats/format_sln.c @@ -160,6 +160,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)