Changeset 5673 for pjproject/trunk/pjmedia/src/pjmedia-codec/ilbc.c
- Timestamp:
- Oct 16, 2017 3:49:22 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/ilbc.c
r5187 r5673 178 178 PJ_ASSERT_RETURN(mode==0 || mode==20 || mode==30, PJ_EINVAL); 179 179 180 if (ilbc_factory.endpt != NULL) { 181 /* Already initialized. */ 182 return PJ_SUCCESS; 183 } 184 180 185 /* Create iLBC codec factory. */ 181 186 ilbc_factory.base.op = &ilbc_factory_op; … … 189 194 190 195 if (mode == 20) { 191 ilbc_factory.bps = 15200; 196 ilbc_factory.bps = 15200; 192 197 } else { 193 198 ilbc_factory.bps = 13333; … … 196 201 /* Get the codec manager. */ 197 202 codec_mgr = pjmedia_endpt_get_codec_mgr(endpt); 198 if (!codec_mgr) 203 if (!codec_mgr) { 204 ilbc_factory.endpt = NULL; 199 205 return PJ_EINVALIDOP; 206 } 200 207 201 208 /* Register codec factory to endpoint. */ 202 209 status = pjmedia_codec_mgr_register_factory(codec_mgr, 203 210 &ilbc_factory.base); 204 if (status != PJ_SUCCESS) 211 if (status != PJ_SUCCESS) { 212 ilbc_factory.endpt = NULL; 205 213 return status; 206 214 } 207 215 208 216 /* Done. */ … … 221 229 pj_status_t status; 222 230 231 if (ilbc_factory.endpt == NULL) { 232 /* Not registered. */ 233 return PJ_SUCCESS; 234 } 223 235 224 236 /* Get the codec manager. */
Note: See TracChangeset
for help on using the changeset viewer.