diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-04 12:36:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-09 17:42:04 +0200 |
commit | 7be2d2a70cd20d88fd826a83f87037d14681a579 (patch) | |
tree | ed3adf7b50fc628acb98fb1c069f699c992b75ef /libavcodec/h264.c | |
parent | 98d0c4236c7542c87f012228d3bc88aea67bddc2 (diff) | |
download | ffmpeg-7be2d2a70cd20d88fd826a83f87037d14681a579.tar.gz |
avcodec/h264: Use only one ERContext
This fixes slice threads with error concealment
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 639761f07a..2e286231b0 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -498,7 +498,11 @@ int ff_h264_slice_context_init(H264Context *h, H264SliceContext *sl) sl->ref_cache[1][scan8[7] + 1] = sl->ref_cache[1][scan8[13] + 1] = PART_NOT_AVAILABLE; + if (sl != h->slice_ctx) { + memset(er, 0, sizeof(*er)); + } else if (CONFIG_ERROR_RESILIENCE) { + /* init ER */ er->avctx = h->avctx; er->decode_mb = h264_er_decode_mb; |