av_opt_set_int(mst->resample_ctx, "out_sample_fmt", c->sample_fmt, 0);
av_opt_set_int(mst->resample_ctx, "out_channel_layout", c->channel_layout, 0);
- if ((ret = swr_init(mst->resample_ctx)) < 0) {
+ if (swr_init(mst->resample_ctx) < 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to initialize the resampling context\n");
av_free(mst->resample_ctx);
mst->resample_ctx = NULL;
static switch_status_t av_file_write(switch_file_handle_t *handle, void *data, size_t *len)
{
-
uint32_t datalen = 0;
switch_status_t status = SWITCH_STATUS_SUCCESS;
// uint8_t buf[SWITCH_RECOMMENDED_BUFFER_SIZE] = { 0 }, *bp = buf;
}
}
- while ((inuse = switch_buffer_inuse(context->audio_buffer)) >= bytes) {
+ while (switch_buffer_inuse(context->audio_buffer) >= bytes) {
AVPacket pkt[2] = { {0} };
int got_packet[2] = {0};
int j = 0, ret = -1, audio_stream_count = 1;