Commit 7ecf3bc9 authored by Frank Galligan's avatar Frank Galligan
Browse files

Fix ref count decrement code.

Buffer 0 would never be decremented, so it could only be used
once.

Change-Id: I605d99fa2a513eadae6a0e230161729880653282
parent a1123538
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment