提交 fbf2284c 编写于 作者: M Michael Niedermayer

check if threads_count is too large

Originally committed as revision 2798 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 1e31d32c
......@@ -886,6 +886,11 @@ int MPV_encode_init(AVCodecContext *avctx)
return -1;
}
if(s->avctx->thread_count > MAX_THREADS || 16*s->avctx->thread_count > s->height){
av_log(avctx, AV_LOG_ERROR, "too many threads\n");
return -1;
}
if(s->avctx->thread_count > 1)
s->rtp_mode= 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册