Correct show_existing_frame LAST_FRAME refresh
This corrects a mistake made in
29147cfe56c41a91b4e1eb636edc0e9c1bf84f98
BUG=aomedia:2207
Change-Id: Id759e22ae0c91c79ec783fc2d5ff09a31dfd9c8a
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index b5f8cb2..f8aef23 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -3494,8 +3494,10 @@
if (cm->show_existing_frame) {
// If we are not indicating to the decoder that this frame is
// a show_existing_frame, which occurs in error_resilient mode,
- // we still want to refresh the LAST_FRAME.
- cpi->refresh_last_frame = !encode_show_existing_frame(cm);
+ // we still want to refresh the LAST_FRAME when the current frame
+ // was the source of an ext_arf.
+ cpi->refresh_last_frame =
+ !encode_show_existing_frame(cm) && cpi->rc.is_src_frame_ext_arf;
cpi->refresh_golden_frame = 0;
cpi->refresh_bwd_ref_frame = 0;
cpi->refresh_alt2_ref_frame = 0;