summaryrefslogtreecommitdiff
path: root/main/file.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2008-12-15 17:24:28 +0000
committerJoshua Colp <jcolp@digium.com>2008-12-15 17:24:28 +0000
commitd330d3e210203a5270c8ef61be6a2ca484d99055 (patch)
treea4da4e0b2d04196ad75ab59be3e6df85c09000a5 /main/file.c
parent808a5fda59d7d81b11600e05bb0fd3ebdb09759f (diff)
Use ast_seekstream to return the file stream back to the beginning instead of directly seeking to zero. This is because some audio formats have headers at the front that need to be skipped, which will be done by the format module.
(closes issue #14079) Reported by: elguero git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/file.c')
-rw-r--r--main/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/file.c b/main/file.c
index b2ebfd79d..5e920cc3b 100644
--- a/main/file.c
+++ b/main/file.c
@@ -911,7 +911,7 @@ int ast_streamfile(struct ast_channel *chan, const char *filename, const char *p
* return the file had no data. */
seekattempt = fseek(fs->f, -1, SEEK_END);
if (!seekattempt)
- fseek(fs->f, 0, SEEK_SET);
+ ast_seekstream(fs, 0, SEEK_SET);
else
return 0;