mpeg1video: fix regression with slices != threads
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 12 Dec 2012 18:52:46 +0000 (19:52 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 12 Dec 2012 23:15:52 +0000 (00:15 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a01679586cd9ac8470b81c0299fc7e13fd980d64)

libavcodec/mpegvideo_enc.c

index ab5f12a..7d7672b 100644 (file)
@@ -632,7 +632,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
         return -1;
     }
 
-    if (s->avctx->thread_count > 1)
+    if (s->avctx->slices > 1 || s->avctx->thread_count > 1)
         s->rtp_mode = 1;
 
     if (s->avctx->thread_count > 1 && s->codec_id == AV_CODEC_ID_H263P)