Okay, fseek doesn't return an offset

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2006-02-19 18:29:16 +00:00
parent 3da520e492
commit 0a1d8918d8

View File

@@ -172,7 +172,6 @@ static int slinear_write(struct ast_filestream *fs, struct ast_frame *f)
static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whence)
{
off_t offset=0,min,cur,max;
int res;
min = 0;
sample_offset <<= 1;
@@ -190,12 +189,7 @@ static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whenc
}
/* always protect against seeking past begining. */
offset = (offset < min)?min:offset;
res = fseek(fs->f, offset, SEEK_SET);
/* Negative values indicate error */
if (res > -1)
return res / 2;
else
return res;
return fseek(fs->f, offset, SEEK_SET);
}
static int slinear_trunc(struct ast_filestream *fs)