diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-09-22 22:50:55 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-09-22 22:50:55 +0000 |
commit | f65b7ed7c9ce17ef72317b777571b97125f3085a (patch) | |
tree | bd61091951506adcae3a244e5c71505a2f783a90 /formats | |
parent | 8e91f10fe3b2aee8dd301f5863a3c27aa1710e78 (diff) |
Merged revisions 143904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r143904 | seanbright | 2008-09-22 18:50:07 -0400 (Mon, 22 Sep 2008) | 16 lines
Merged revisions 143903 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r143903 | seanbright | 2008-09-22 18:49:00 -0400 (Mon, 22 Sep 2008) | 8 lines
Use the advertised header size in .au files instead of just assuming they
are 24 bytes (the minimum).
(closes issue #13450)
Reported by: jamessan
Patches:
pcm-header.diff uploaded by jamessan (license 246)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@143905 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'formats')
-rw-r--r-- | formats/format_pcm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/formats/format_pcm.c b/formats/format_pcm.c index 07b474469..a9c44d502 100644 --- a/formats/format_pcm.c +++ b/formats/format_pcm.c @@ -271,9 +271,10 @@ static int check_header(FILE *f) if (magic != (uint32_t) AU_MAGIC) { ast_log(LOG_WARNING, "Bad magic: 0x%x\n", magic); } -/* hdr_size = ltohl(header[AU_HDR_HDR_SIZE_OFF]); - if (hdr_size < AU_HEADER_SIZE)*/ - hdr_size = AU_HEADER_SIZE; + hdr_size = ltohl(header[AU_HDR_HDR_SIZE_OFF]); + if (hdr_size < AU_HEADER_SIZE) { + hdr_size = AU_HEADER_SIZE; + } /* data_size = ltohl(header[AU_HDR_DATA_SIZE_OFF]); */ encoding = ltohl(header[AU_HDR_ENCODING_OFF]); if (encoding != AU_ENC_8BIT_ULAW) { |