]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/mpeg: Initialize quarter_sample parameter from previous thread.
authorAndriy Gelman <andriy.gelman@gmail.com>
Thu, 13 Dec 2018 04:57:35 +0000 (23:57 -0500)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 14 Dec 2018 18:09:11 +0000 (19:09 +0100)
Fixes #7410.
The value of sub-pixel precision for me/mc can change during an Intra frame. In multi-threaded decoding this change is not propagated to other frame threads causing decoding artifacts. This patch initializes the sub-pixel precision parameter from previous thread, which fixes the issue.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mpegvideo.c

index d4d3bea6498f91d1a7063049498b3b23e4d14267..dbb6ab9b393b731ddcce1bed3ca9ab434a81bcda 100644 (file)
@@ -538,6 +538,8 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
     s->avctx->width         = s1->avctx->width;
     s->avctx->height        = s1->avctx->height;
 
+    s->quarter_sample       = s1->quarter_sample;
+
     s->coded_picture_number = s1->coded_picture_number;
     s->picture_number       = s1->picture_number;