Commit 912f6702 authored by michael's avatar michael

check if threads_count is too large


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2798 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1c675df5
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment