提交 e536cdae authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-10527: [mod_av] AV tweaks -- using more threads on decode is a little buggy

上级 968beeda
...@@ -1024,7 +1024,7 @@ static switch_status_t switch_h264_init(switch_codec_t *codec, switch_codec_flag ...@@ -1024,7 +1024,7 @@ static switch_status_t switch_h264_init(switch_codec_t *codec, switch_codec_flag
if (threads > 4) threads = 4; if (threads > 4) threads = 4;
context->decoder_ctx = avcodec_alloc_context3(context->decoder); context->decoder_ctx = avcodec_alloc_context3(context->decoder);
context->decoder_ctx->thread_count = threads; //context->decoder_ctx->thread_count = threads;
if (avcodec_open2(context->decoder_ctx, context->decoder, NULL) < 0) { if (avcodec_open2(context->decoder_ctx, context->decoder, NULL) < 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error openning codec\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error openning codec\n");
goto error; goto error;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论