From b52b0913c25c95dcf2aa09764d18477e1421b286 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 10 Sep 2009 14:12:05 +0000 Subject: [PATCH] Check for thread_count==0. fixed issue1333 Originally committed as revision 19809 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mpegvideo_enc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 9036588ee4..6e7837ad01 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -441,6 +441,11 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) 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;