Changeset 3837 for pjproject/trunk/pjmedia/src/pjmedia/stream.c
- Timestamp:
- Oct 23, 2011 6:59:48 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r3664 r3837 2221 2221 2222 2222 status = create_channel( pool, stream, PJMEDIA_DIR_DECODING, 2223 info-> fmt.pt, info, &stream->dec);2223 info->rx_pt, info, &stream->dec); 2224 2224 if (status != PJ_SUCCESS) 2225 2225 goto err_cleanup; … … 2835 2835 return PJMEDIA_EINVALIDPT; 2836 2836 2837 /* Get payload type for receiving direction */ 2838 si->rx_pt = pt; 2839 2837 2840 /* Get codec info. 2838 2841 * For static payload types, get the info from codec manager. … … 2894 2897 2895 2898 } else { 2899 pjmedia_codec_id codec_id; 2900 pj_str_t codec_id_st; 2901 const pjmedia_codec_info *p_info; 2896 2902 2897 2903 attr = pjmedia_sdp_media_find_attr(local_m, &ID_RTPMAP, … … 2908 2914 si->fmt.type = si->type; 2909 2915 si->fmt.pt = pj_strtoul(&local_m->desc.fmt[fmti]); 2910 pj_strdup(pool, &si->fmt.encoding_name, &rtpmap->enc_name);2916 si->fmt.encoding_name = rtpmap->enc_name; 2911 2917 si->fmt.clock_rate = rtpmap->clock_rate; 2912 2918 … … 2919 2925 si->fmt.channel_cnt = 1; 2920 2926 } 2927 2928 /* Normalize the codec info from codec manager. Note that the 2929 * payload type will be resetted to its default (it might have 2930 * been rewritten by the SDP negotiator to match to the remote 2931 * offer), this is intentional as currently some components may 2932 * prefer (or even require) the default PT in codec info. 2933 */ 2934 pjmedia_codec_info_to_id(&si->fmt, codec_id, sizeof(codec_id)); 2935 2936 i = 1; 2937 codec_id_st = pj_str(codec_id); 2938 status = pjmedia_codec_mgr_find_codecs_by_id(mgr, &codec_id_st, 2939 &i, &p_info, NULL); 2940 if (status != PJ_SUCCESS) 2941 return status; 2942 2943 pj_memcpy(&si->fmt, p_info, sizeof(pjmedia_codec_info)); 2921 2944 2922 2945 /* Determine payload type for outgoing channel, by finding … … 2966 2989 2967 2990 /* Get local fmtp for our decoder. */ 2968 pjmedia_stream_info_parse_fmtp(pool, local_m, si-> fmt.pt,2991 pjmedia_stream_info_parse_fmtp(pool, local_m, si->rx_pt, 2969 2992 &si->param->setting.dec_fmtp); 2970 2993
Note: See TracChangeset
for help on using the changeset viewer.