From: Joshua Colp Date: Mon, 15 Dec 2008 17:24:28 +0000 (+0000) Subject: Use ast_seekstream to return the file stream back to the beginning instead of directl... X-Git-Tag: 1.6.2.0-beta1~611 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d330d3e210203a5270c8ef61be6a2ca484d99055;p=thirdparty%2Fasterisk.git 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 --- 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;