From d330d3e210203a5270c8ef61be6a2ca484d99055 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 15 Dec 2008 17:24:28 +0000 Subject: [PATCH] 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 --- main/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/file.c b/main/file.c index b2ebfd79dc..5e920cc3b4 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;