diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-11 03:37:19 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-11 03:37:19 +0000 |
commit | 560327b0ecaa7760179a7e6f89c110afb47174d5 (patch) | |
tree | 0dad1738e7ed3f7b28fef1c905f0652b623db97e /main/frame.c | |
parent | a8ec4ca20217748203fc7f8c541cf4d980bcda61 (diff) |
- Fix the last set of places where incorrect assumptions were made about the
sample length with g722. It is _2_ samples per byte, not 1. This was all
over the place, and I believed it, and it is what caused me to take so long
to figure out what was broken.
- Update copyright information on codec_g722.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98081 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/frame.c')
-rw-r--r-- | main/frame.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/frame.c b/main/frame.c index 755e8031e..bb386df55 100644 --- a/main/frame.c +++ b/main/frame.c @@ -1372,9 +1372,9 @@ int ast_codec_get_samples(struct ast_frame *f) break; case AST_FORMAT_ULAW: case AST_FORMAT_ALAW: - case AST_FORMAT_G722: samples = f->datalen; break; + case AST_FORMAT_G722: case AST_FORMAT_ADPCM: case AST_FORMAT_G726: case AST_FORMAT_G726_AAL2: @@ -1410,9 +1410,9 @@ int ast_codec_get_len(int format, int samples) break; case AST_FORMAT_ULAW: case AST_FORMAT_ALAW: - case AST_FORMAT_G722: len = samples; break; + case AST_FORMAT_G722: case AST_FORMAT_ADPCM: case AST_FORMAT_G726: case AST_FORMAT_G726_AAL2: |