diff options
author | Jingning Han <jingning@google.com> | 2018-08-21 23:44:28 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-08-21 23:44:28 +0000 |
commit | a81a3415576be3ab171cadd58bebb06dabbbaafa (patch) | |
tree | 26bafeebf7d5bca24d85d5eb0460910759d6f978 | |
parent | 36e8d4742735060f12d590177035171b6596122c (diff) | |
parent | c87895b14495d199738bc2368f15a2cff6bb6463 (diff) | |
download | libvpx-a81a3415576be3ab171cadd58bebb06dabbbaafa.tar libvpx-a81a3415576be3ab171cadd58bebb06dabbbaafa.tar.gz libvpx-a81a3415576be3ab171cadd58bebb06dabbbaafa.tar.bz2 libvpx-a81a3415576be3ab171cadd58bebb06dabbbaafa.zip |
Merge "Safely swap the show frame buffer pointer in show_existing mode"
-rw-r--r-- | vp9/encoder/vp9_encoder.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 0151e1ba1..d9d38b766 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -4839,8 +4839,10 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, size_t *size, // current ARF will be directly used as the final reconstructed frame. This is // an encoder control scheme. One could in principle explore other // possibilities to arrange the reference frame buffer and their coding order. - if (cm->show_existing_frame) - cm->new_fb_idx = cm->ref_frame_map[cpi->alt_fb_idx]; + if (cm->show_existing_frame) { + ref_cnt_fb(cm->buffer_pool->frame_bufs, &cm->new_fb_idx, + cm->ref_frame_map[cpi->alt_fb_idx]); + } cpi->last_frame_dropped = 0; cpi->svc.last_layer_dropped[cpi->svc.spatial_layer_id] = 0; |