aboutsummaryrefslogtreecommitdiffstats
path: root/addons
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-06 15:35:43 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-06 15:35:43 +0000
commit7ac82f7eab7617739ab0029b246a9fff987671ff (patch)
tree57b389c1ed3167974c44e8d1f7a3dd7d89ae6eb9 /addons
parent67e78241fb87de79748042f40ae9eaa5aafb1aad (diff)
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: http://svn.digium.com/svn/asterisk/trunk@238014 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'addons')
-rw-r--r--addons/format_mp3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/format_mp3.c b/addons/format_mp3.c
index 4e71961f5..ceb1accbb 100644
--- a/addons/format_mp3.c
+++ b/addons/format_mp3.c
@@ -264,7 +264,7 @@ static int mp3_seek(struct ast_filestream *s, off_t sample_offset, int whence)
}
p->seek = offset;
- return p->seek;
+ return fseek(s->f, offset, SEEK_SET);
}