ref: a2c6f6e94592fbc0df239bd17c65454d07572453
parent: 21ba242bfd5160dcd1ddb6c6d40c2251c0b1b0e4
parent: 872fc3ded88da483e723d5aa0a19993dff191fc7
author: Paul Wilkins <paulwilkins@google.com>
date: Tue Mar 12 12:00:30 EDT 2013
Merge "disambiguate superframe index in vp9_stop_encode()" into experimental
--- a/vp9/encoder/vp9_boolhuff.c
+++ b/vp9/encoder/vp9_boolhuff.c
@@ -53,6 +53,10 @@
for (i = 0; i < 32; i++)
encode_bool(br, 0, 128);
+
+ // Ensure there's no ambigous collision with any index marker bytes
+ if ((br->buffer[br->pos - 1] & 0xe0) == 0xc0)
+ br->buffer[br->pos++] = 0;
}