aboutsummaryrefslogtreecommitdiffstats
path: root/formats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-19 18:29:16 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-19 18:29:16 +0000
commit2c76484a2e1d1768dab601d20831a95ee81974e6 (patch)
tree63709aab35eab827406db56df1f38fdc8ff1f070 /formats
parentb2192828b17f330cd491ecbac0698a6111eb1802 (diff)
Okay, fseek doesn't return an offset
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@10487 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'formats')
-rw-r--r--formats/format_sln.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/formats/format_sln.c b/formats/format_sln.c
index c1a16618d..d155b09a2 100644
--- a/formats/format_sln.c
+++ b/formats/format_sln.c
@@ -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)