h263penc: fix multitheraded encoding
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 15 Aug 2012 20:14:24 +0000 (22:14 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 15 Aug 2012 20:14:24 +0000 (22:14 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegvideo_enc.c

index a8feeb6..6798061 100644 (file)
@@ -594,6 +594,9 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
     if (s->avctx->thread_count > 1)
         s->rtp_mode = 1;
 
+    if (s->avctx->thread_count > 1 && s->codec_id == AV_CODEC_ID_H263P)
+        s->h263_slice_structured = 1;
+
     if (!avctx->time_base.den || !avctx->time_base.num) {
         av_log(avctx, AV_LOG_ERROR, "framerate not set\n");
         return -1;