shithub: libvpx

Download patch

ref: 7ba6a676f54202b27e408e8d79086faa082eecb5
parent: 0c2ee67ad60fd53502edacb584f8973e2af6a5f7
parent: 61c5e94e228993bee187b11e415d3e7c4ac9286d
author: Yaowu Xu <[email protected]>
date: Tue Jan 6 12:31:13 EST 2015

Merge "Use -1 consistently as invalid buffer idx"

--- a/vp9/decoder/vp9_decoder.c
+++ b/vp9/decoder/vp9_decoder.c
@@ -238,7 +238,7 @@
 
   // Invalidate these references until the next frame starts.
   for (ref_index = 0; ref_index < 3; ref_index++)
-    cm->frame_refs[ref_index].idx = INT_MAX;
+    cm->frame_refs[ref_index].idx = -1;
 }
 
 int vp9_receive_compressed_data(VP9Decoder *pbi,
@@ -258,7 +258,7 @@
     // TODO(jkoleszar): Error concealment is undefined and non-normative
     // at this point, but if it becomes so, [0] may not always be the correct
     // thing to do here.
-    if (cm->frame_refs[0].idx != INT_MAX)
+    if (cm->frame_refs[0].idx > 0)
       cm->frame_refs[0].buf->corrupted = 1;
   }