Index: main/file.c =================================================================== --- main/file.c (revision 164276) +++ main/file.c (working copy) @@ -898,6 +898,7 @@ struct ast_filestream *vfs=NULL; char fmt[256]; int seekattempt; + long curoffset; int res; fs = ast_openstream(chan, filename, preflang); @@ -909,9 +910,13 @@ /* check to see if there is any data present (not a zero length file), * done this way because there is no where for ast_openstream_full to * return the file had no data. */ + + curoffset = ftell(fs->f); /* Keep track of current offset since not all audio files start at 0 */ + seekattempt = fseek(fs->f, -1, SEEK_END); + if (!seekattempt) - fseek(fs->f, 0, SEEK_SET); + fseek(fs->f, curoffset, SEEK_SET); else return 0;