changeset 1989:be2386b2f201 libavcodec

10l
author michael
date Thu, 29 Apr 2004 22:12:29 +0000
parents b5753525f9a8
children 11991f81afd6
files mpegvideo.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;