aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-04 00:49:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-04 00:52:54 +0200
commit6da7625cc395692a71c99d179cb76eea6e8b27ca (patch)
treee9cc769a62e44a17288e89aab2139a91e4e79402 /libavcodec/h264_slice.c
parent959894632ae67e356ede734e352eabda6bb55794 (diff)
parenta4d34e218f548d381e09c483e8dc6ad18a8d571c (diff)
downloadffmpeg-6da7625cc395692a71c99d179cb76eea6e8b27ca.tar.gz
Merge commit 'a4d34e218f548d381e09c483e8dc6ad18a8d571c'
* commit 'a4d34e218f548d381e09c483e8dc6ad18a8d571c': h264: disable ER by default Conflicts: libavcodec/h264.c libavcodec/h264_picture.c libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index c10568a4ed..3f400def34 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -583,6 +583,7 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
return ret;
}
+ h->enable_er = h1->enable_er;
h->workaround_bugs = h1->workaround_bugs;
h->low_delay = h1->low_delay;
h->droppable = h1->droppable;
@@ -711,7 +712,7 @@ static int h264_frame_start(H264Context *h)
h->slice_ctx[i].uvlinesize = h->cur_pic_ptr->f.linesize[1];
}
- if (CONFIG_ERROR_RESILIENCE) {
+ if (CONFIG_ERROR_RESILIENCE && h->enable_er) {
ff_er_frame_start(&h->slice_ctx[0].er);
ff_h264_set_erpic(&h->slice_ctx[0].er.last_pic, NULL);
ff_h264_set_erpic(&h->slice_ctx[0].er.next_pic, NULL);
@@ -2283,6 +2284,9 @@ static void er_add_slice(H264SliceContext *sl,
int startx, int starty,
int endx, int endy, int status)
{
+ if (!sl->h264->enable_er)
+ return;
+
if (CONFIG_ERROR_RESILIENCE) {
ERContext *er = &sl->er;