From 7ecf3bc91c1773902bd645655213d1c592251707 Mon Sep 17 00:00:00 2001 From: Frank Galligan Date: Wed, 4 Dec 2013 22:21:00 -0800 Subject: [PATCH] Fix ref count decrement code. Buffer 0 would never be decremented, so it could only be used once. Change-Id: I605d99fa2a513eadae6a0e230161729880653282 --- vp9/common/vp9_onyxc_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index 6d14128a8..2c410669a 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -240,7 +240,7 @@ static int get_free_fb(VP9_COMMON *cm) { static void ref_cnt_fb(int *buf, int *idx, int new_idx) { const int ref_index = *idx; - if (ref_index > 0 && buf[ref_index] > 0) + if (ref_index >= 0 && buf[ref_index] > 0) buf[ref_index]--; *idx = new_idx;