aboutsummaryrefslogtreecommitdiffstats
path: root/formats/format_vox.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-20 23:35:12 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-20 23:35:12 +0000
commite8504c1dcecfd65acce1e93c3f3959e0b47fd11d (patch)
tree867b95de4af325e2b9e52f635b10137ffde176ba /formats/format_vox.c
parente100a316d4ea686cc45a1d549a2e396579712e43 (diff)
Bug 5984 - Convert file offsets to 64 bit
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10579 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'formats/format_vox.c')
-rw-r--r--formats/format_vox.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/formats/format_vox.c b/formats/format_vox.c
index 60d2630be..8cc143178 100644
--- a/formats/format_vox.c
+++ b/formats/format_vox.c
@@ -178,14 +178,14 @@ static char *vox_getcomment(struct ast_filestream *s)
return NULL;
}
-static int vox_seek(struct ast_filestream *fs, long sample_offset, int whence)
+static int vox_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
{
off_t offset=0,min,cur,max,distance;
min = 0;
- cur = ftell(fs->f);
- fseek(fs->f, 0, SEEK_END);
- max = ftell(fs->f);
+ cur = ftello(fs->f);
+ fseeko(fs->f, 0, SEEK_END);
+ max = ftello(fs->f);
/* have to fudge to frame here, so not fully to sample */
distance = sample_offset/2;
@@ -199,19 +199,19 @@ static int vox_seek(struct ast_filestream *fs, long sample_offset, int whence)
offset = (offset > max)?max:offset;
offset = (offset < min)?min:offset;
}
- fseek(fs->f, offset, SEEK_SET);
- return ftell(fs->f);
+ fseeko(fs->f, offset, SEEK_SET);
+ return ftello(fs->f);
}
static int vox_trunc(struct ast_filestream *fs)
{
- return ftruncate(fileno(fs->f), ftell(fs->f));
+ return ftruncate(fileno(fs->f), ftello(fs->f));
}
-static long vox_tell(struct ast_filestream *fs)
+static off_t vox_tell(struct ast_filestream *fs)
{
off_t offset;
- offset = ftell(fs->f) << 1;
+ offset = ftello(fs->f) << 1;
return offset;
}