Skip to content
Snippets Groups Projects
Commit f0190a10 authored by Sean Bright's avatar Sean Bright
Browse files

Fix reading samples from format_mp3 after ast_seekstream/ast_tellstream.

There is a bug when using ast_seekstream/ast_tellstream with format_mp3 in that
the file read position is not reset before attempting to read samples.  So when
we seek to determine the maximum size of the file (as in res_agi's STREAM FILE)
we weren't then resetting the file pointer so that we could properly read
samples.  This patch addresses that (in a similar manner to format_wav.c).

(closes issue #15224)
Reported by: rbd
Patches:
      20091230_addons_1.4_issue15224.diff uploaded by seanbright (license 71)
Tested by: rbd, seanbright

Review: https://reviewboard.asterisk.org/r/453


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@238014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 5d7b8024
Branches
Tags
No related merge requests found
...@@ -264,7 +264,7 @@ static int mp3_seek(struct ast_filestream *s, off_t sample_offset, int whence) ...@@ -264,7 +264,7 @@ static int mp3_seek(struct ast_filestream *s, off_t sample_offset, int whence)
} }
p->seek = offset; p->seek = offset;
return p->seek; return fseek(s->f, offset, SEEK_SET);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment