diff options
author | Andriy Gelman <andriy.gelman@gmail.com> | 2018-12-12 23:57:35 -0500 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-12-14 19:09:11 +0100 |
commit | 5282db5929f25ca9566a47ad217794842b364afc (patch) | |
tree | 1cbb5e582bd1dff9bb43121632c5e532e1e8f416 /libavcodec/mpegvideo.c | |
parent | 78e7b70395e984326bf2b82727d9943ecc10617e (diff) | |
download | ffmpeg-5282db5929f25ca9566a47ad217794842b364afc.tar.gz |
avcodec/mpeg: Initialize quarter_sample parameter from previous thread.
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>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d4d3bea649..dbb6ab9b39 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -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; |