So, instead of calling it early, revert FS-3646 and add a check on free_context to really do lame stuff only
if lame has been set ready, avoid seg faults in some corner cases.
mpg123_delete(context->mh);
}
- if (context->fp) {
+ if (context->fp && context->lame_ready) {
unsigned char mp3buffer[20480];
int len;
int16_t blank[2048] = { 0 }, *r = NULL;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error opening %s\n", path);
goto error;
}
- if (!context->lame_ready) {
- lame_init_params(context->gfp);
- lame_print_config(context->gfp);
- context->lame_ready = 1;
- }
}
}