Skip to content
Snippets Groups Projects
Commit 206883d1 authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

Merged revisions 10487 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r10487 | tilghman | 2006-02-19 12:29:16 -0600 (Sun, 19 Feb 2006) | 2 lines

Okay, fseek doesn't return an offset

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 55b1d07a
No related branches found
No related tags found
No related merge requests found
...@@ -172,7 +172,6 @@ static int slinear_write(struct ast_filestream *fs, struct ast_frame *f) ...@@ -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) static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whence)
{ {
off_t offset=0,min,cur,max; off_t offset=0,min,cur,max;
int res;
min = 0; min = 0;
sample_offset <<= 1; sample_offset <<= 1;
...@@ -190,12 +189,7 @@ static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whenc ...@@ -190,12 +189,7 @@ static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whenc
} }
/* always protect against seeking past begining. */ /* always protect against seeking past begining. */
offset = (offset < min)?min:offset; offset = (offset < min)?min:offset;
res = fseek(fs->f, offset, SEEK_SET); return fseek(fs->f, offset, SEEK_SET);
/* Negative values indicate error */
if (res > -1)
return res / 2;
else
return res;
} }
static int slinear_trunc(struct ast_filestream *fs) static int slinear_trunc(struct ast_filestream *fs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment