mpeg1enc: Disable threads for resolutions too large for multi-threading
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 20 Jan 2013 03:14:09 +0000 (04:14 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 20 Jan 2013 03:25:52 +0000 (04:25 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0c6b0409af070a3bfb02b55fde8ba18219edc76b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpeg12enc.c

index 9e31543..d4606a9 100644 (file)
@@ -132,6 +132,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
 {
     MpegEncContext *s = avctx->priv_data;
 
+    if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && avctx->height > 2800)
+        avctx->thread_count = 1;
+
     if(ff_MPV_encode_init(avctx) < 0)
         return -1;