Changeset 5239 for pjproject/trunk/pjmedia/src/pjmedia/stream.c
- Timestamp:
- Feb 4, 2016 6:11:58 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r5234 r5239 2110 2110 2111 2111 /* Open the codec. */ 2112 2113 /* The clock rate for Opus codec is not static, 2114 * it's negotiated in the SDP. 2115 */ 2116 if (!pj_stricmp2(&info->fmt.encoding_name, "opus")) { 2117 stream->codec_param.info.clock_rate = info->fmt.clock_rate; 2118 stream->codec_param.info.channel_cnt = info->fmt.channel_cnt; 2119 } 2120 2112 2121 status = pjmedia_codec_open(stream->codec, &stream->codec_param); 2113 2122 if (status != PJ_SUCCESS) … … 2224 2233 /* RTP clock rate = 1/2 real clock rate */ 2225 2234 stream->rtp_tx_ts_len_per_pkt >>= 1; 2235 } else if (!pj_stricmp2(&info->fmt.encoding_name, "opus")) { 2236 unsigned opus_ts_modifier = 48000 / afd->clock_rate; 2237 stream->rtp_rx_check_cnt = 0; 2238 stream->has_g722_mpeg_bug = PJ_TRUE; 2239 stream->rtp_tx_ts_len_per_pkt *= opus_ts_modifier; 2240 stream->rtp_rx_ts_len_per_frame *= opus_ts_modifier; 2226 2241 } 2227 2242 #endif
Note: See TracChangeset
for help on using the changeset viewer.