Browse code

mpeg1enc: Disable threads for resolutions too large for multi-threading

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0c6b0409af070a3bfb02b55fde8ba18219edc76b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2013/01/20 12:14:09
Showing 1 changed files
... ...
@@ -132,6 +132,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
132 132
 {
133 133
     MpegEncContext *s = avctx->priv_data;
134 134
 
135
+    if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && avctx->height > 2800)
136
+        avctx->thread_count = 1;
137
+
135 138
     if(ff_MPV_encode_init(avctx) < 0)
136 139
         return -1;
137 140