summaryrefslogtreecommitdiff
path: root/pjmedia/src/pjmedia
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2012-10-05 10:04:54 +0000
committerLiong Sauw Ming <ming@teluu.com>2012-10-05 10:04:54 +0000
commitad13c66178df01fdc35ba7278d79f7cbc878bb81 (patch)
tree37b45230b36b91cde726e5c2151e94127c4ee0b6 /pjmedia/src/pjmedia
parent5a306678cb2afa34024b1b00a04739c94aaf12ec (diff)
Re #1586: Add support for SILK multiple frames per packet
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4278 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src/pjmedia')
-rw-r--r--pjmedia/src/pjmedia/stream.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/pjmedia/src/pjmedia/stream.c b/pjmedia/src/pjmedia/stream.c
index 2f752a03..2414cf47 100644
--- a/pjmedia/src/pjmedia/stream.c
+++ b/pjmedia/src/pjmedia/stream.c
@@ -2177,12 +2177,16 @@ PJ_DEF(pj_status_t) pjmedia_stream_create( pjmedia_endpt *endpt,
}
/* Get the frame size */
- stream->frame_size = stream->codec_param.info.max_bps *
- stream->codec_param.info.frm_ptime / 8 / 1000;
- if ((stream->codec_param.info.max_bps * stream->codec_param.info.frm_ptime)
- % 8000 != 0)
- {
- ++stream->frame_size;
+ if (stream->codec_param.info.max_rx_frame_size > 0) {
+ stream->frame_size = stream->codec_param.info.max_rx_frame_size;
+ } else {
+ stream->frame_size = stream->codec_param.info.max_bps *
+ stream->codec_param.info.frm_ptime / 8 / 1000;
+ if ((stream->codec_param.info.max_bps *
+ stream->codec_param.info.frm_ptime) % 8000 != 0)
+ {
+ ++stream->frame_size;
+ }
}
/* How many consecutive PLC frames can be generated */