diff mpegvideo_enc.c @ 10155:30e57cd5d5f5 libavcodec

Check for thread_count==0. fixed issue1333
author michael
date Thu, 10 Sep 2009 14:12:05 +0000
parents 38cfe222e1a4
children 59ec306245a4
line wrap: on
line diff
--- a/mpegvideo_enc.c	Thu Sep 10 12:23:45 2009 +0000
+++ b/mpegvideo_enc.c	Thu Sep 10 14:12:05 2009 +0000
@@ -441,6 +441,11 @@
         return -1;
     }
 
+    if(s->avctx->thread_count < 1){
+        av_log(avctx, AV_LOG_ERROR, "automatic thread number detection not supported by codec, patch welcome\n");
+        return -1;
+    }
+
     if(s->avctx->thread_count > 1)
         s->rtp_mode= 1;