summaryrefslogtreecommitdiff
path: root/libavcodec/h264_refs.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-11 16:40:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-11 17:30:02 +0100
commit855463c007719d8a9cddfa757a00ae5428b3dbde (patch)
treeb3fbc18aac19157e29c155dca03919348cbf97be /libavcodec/h264_refs.c
parentcba199b5952feca4df39560d5c42cb7992e5d875 (diff)
avcodec/h264: Keep a reference to the last picture for EC
This and the next commit improve error concealment for green-block-artifacts-from-canon-100-hs.MOV Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_refs.c')
-rw-r--r--libavcodec/h264_refs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 12da9210be..78c283c7a0 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -493,6 +493,10 @@ void ff_h264_remove_all_refs(H264Context *h)
}
assert(h->long_ref_count == 0);
+ ff_h264_unref_picture(h, &h->last_pic_for_ec);
+ if (h->short_ref_count)
+ ff_h264_ref_picture(h, &h->last_pic_for_ec, h->short_ref[0]);
+
for (i = 0; i < h->short_ref_count; i++) {
unreference_pic(h, h->short_ref[i], 0);
h->short_ref[i] = NULL;