# HG changeset patch # User michael # Date 1083276749 0 # Node ID be2386b2f201d7a63d36ce29f2799ac814c194a7 # Parent b5753525f9a84db6578dd1752219a1e2c152c51a 10l diff -r b5753525f9a8 -r be2386b2f201 mpegvideo.c --- a/mpegvideo.c Thu Apr 29 14:21:33 2004 +0000 +++ b/mpegvideo.c Thu Apr 29 22:12:29 2004 +0000 @@ -597,6 +597,11 @@ { int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y; + if(s->avctx->thread_count > MAX_THREADS || 16*s->avctx->thread_count > s->height){ + av_log(s->avctx, AV_LOG_ERROR, "too many threads\n"); + return -1; + } + dsputil_init(&s->dsp, s->avctx); DCT_common_init(s); @@ -990,11 +995,6 @@ 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;