# HG changeset patch # User michael # Date 1077121576 0 # Node ID 3ea589261c6e8c306bccf3131c7cc2210a82b257 # Parent 93029a89c1737b665f2f5f9a3cee23bdd057ba55 check if threads_count is too large diff -r 93029a89c173 -r 3ea589261c6e mpegvideo.c --- a/mpegvideo.c Wed Feb 18 15:17:54 2004 +0000 +++ b/mpegvideo.c Wed Feb 18 16:26:16 2004 +0000 @@ -886,6 +886,11 @@ 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;