diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-04-29 22:12:29 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-04-29 22:12:29 +0000 |
commit | 000a9c02db82684bc91751f7f41864df98b5f88a (patch) | |
tree | b2869bb0a1850016d0ee5c6b1e55a31d3e544410 | |
parent | e4cb187db8f96634f2306538e134d40f2793e376 (diff) | |
download | ffmpeg-000a9c02db82684bc91751f7f41864df98b5f88a.tar.gz |
10l
Originally committed as revision 3088 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpegvideo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 29804b704e..7b97e15f33 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -597,6 +597,11 @@ int MPV_common_init(MpegEncContext *s) { 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 @@ 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; |