diff --git a/src/mod/applications/mod_av/avformat.c b/src/mod/applications/mod_av/avformat.c index 2fc3459f12..471bc48dff 100644 --- a/src/mod/applications/mod_av/avformat.c +++ b/src/mod/applications/mod_av/avformat.c @@ -377,7 +377,7 @@ static switch_status_t add_stream(av_file_context_t *context, MediaStream *mst, { AVCodecContext *c; switch_status_t status = SWITCH_STATUS_FALSE; - int threads = switch_core_cpu_count(); + //int threads = switch_core_cpu_count(); int buffer_bytes = 2097152; /* 2 mb */ int fps = 15; @@ -406,9 +406,9 @@ GCC_DIAG_OFF(deprecated-declarations) GCC_DIAG_ON(deprecated-declarations) //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "id:%d den:%d num:%d\n", mst->st->id, mst->st->time_base.den, mst->st->time_base.num); - if (threads > 4) { - threads = 4; - } + //if (threads > 4) { + // threads = 4; + // } switch ((*codec)->type) { case AVMEDIA_TYPE_AUDIO: @@ -471,7 +471,7 @@ GCC_DIAG_ON(deprecated-declarations) c->time_base.num = 1; c->gop_size = 25; /* emit one intra frame every x frames at mmst */ c->pix_fmt = AV_PIX_FMT_YUV420P; - c->thread_count = threads; + //c->thread_count = threads; c->rc_initial_buffer_occupancy = buffer_bytes * 8; if (codec_id == AV_CODEC_ID_H264) { @@ -604,10 +604,10 @@ GCC_DIAG_OFF(deprecated-declarations) AVCodecContext *c = mst->st->codec; GCC_DIAG_ON(deprecated-declarations) switch_status_t status = SWITCH_STATUS_FALSE; - int threads = switch_core_cpu_count(); +//int threads = switch_core_cpu_count(); - if (threads > 4) threads = 4; - c->thread_count = threads; +// if (threads > 4) threads = 4; +// c->thread_count = threads; /* open the codec */ ret = avcodec_open2(c, codec, NULL);