summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2014-09-29 10:26:08 +0000
committerNanang Izzuddin <nanang@teluu.com>2014-09-29 10:26:08 +0000
commit492b50749679a499b71b63c4556faa03c24b57ba (patch)
tree8faf391dcc8b617fc1c66cab5c7c6e891bfbdf55 /pjmedia
parentbcbc54440da8cffc2d7b58f107ba25c7e4f3da06 (diff)
[SIPit31] Misc (re #1782): Updated AMR parser behavior, i.e: from raising assertion to just printing log and also discard the whole packet, on receiving invalid AMR frame-type.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4932 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/include/pjmedia-codec/amr_helper.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/pjmedia/include/pjmedia-codec/amr_helper.h b/pjmedia/include/pjmedia-codec/amr_helper.h
index fc63eb47..8b6557b1 100644
--- a/pjmedia/include/pjmedia-codec/amr_helper.h
+++ b/pjmedia/include/pjmedia-codec/amr_helper.h
@@ -1147,7 +1147,11 @@ PJ_INLINE(pj_status_t) pjmedia_codec_amr_parse(
Q = (pj_uint8_t)(TOC & 1);
if (FT > SID_FT && FT < 14) {
- pj_assert(!"Invalid AMR frametype, stream may be corrupted!");
+ /* Discard the whole packet (RFC4867 4.3.2) */
+ //pj_assert(!"Invalid AMR frametype, stream may be corrupted!");
+ cnt = 0;
+ PJ_LOG(4, ("AMR parser", "Invalid AMR frametype, stream may be "
+ "corrupted!"));
break;
}