diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2008-08-27 17:57:32 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2008-08-27 17:57:32 +0000 |
commit | da05ae3130c87a6f10f3cece97d60c635277d1f5 (patch) | |
tree | 725285e213cbdb2bb0e1d378736b8c9e255e309a /pjmedia/src/pjmedia-codec/speex_codec.c | |
parent | affb5a8f2918a4fa4585e000445104a0ef4b3db6 (diff) |
Fixed bug Speex frame parser should discard non-audio parts in the Speex bitstream.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2250 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src/pjmedia-codec/speex_codec.c')
-rw-r--r-- | pjmedia/src/pjmedia-codec/speex_codec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pjmedia/src/pjmedia-codec/speex_codec.c b/pjmedia/src/pjmedia-codec/speex_codec.c index 66616f13..32f7dced 100644 --- a/pjmedia/src/pjmedia-codec/speex_codec.c +++ b/pjmedia/src/pjmedia-codec/speex_codec.c @@ -783,7 +783,7 @@ int speex_get_next_frame(SpeexBits *bits) if (submode == 15) { TRACE__((THIS_FUNC, "Found submode: terminator")); - return 0; + return -1; } else if (submode == 14) { /* in-band signal; next 4 bits contain signal id */ submode = speex_bits_unpack_unsigned(bits, 4); @@ -797,7 +797,7 @@ int speex_get_next_frame(SpeexBits *bits) speex_bits_advance(bits, submode * 8); } else if (submode > 8) { TRACE__((THIS_FUNC, "Unknown sub-mode %d", submode)); - return 0; + return -1; } else { /* NB frame */ unsigned int advance = submode; |