shithub: libvpx

Download patch

ref: 96276f97ec9ac091d64bb073356357e3ab926e97
parent: 13d69d40da1637ec821b13b5105baf85d1638c11
author: Deb Mukherjee <debargha@google.com>
date: Thu Oct 18 08:00:23 EDT 2012

A fix for crashes when #macroblock rows is odd.

Change-Id: If9fc2df4051ccfb8d804dae9d1be08d12d0f81ce

--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -1064,7 +1064,7 @@
       
       (*tp)->Token = EOSB_TOKEN;
       (*tp)++;
-      cpi->tplist[mb_row].stop = *tp;
+      if (mb_row < cm->mb_rows) cpi->tplist[mb_row].stop = *tp;
       break;
     }
 #endif
@@ -1088,7 +1088,7 @@
 #endif
     (*tp)->Token = EOSB_TOKEN;
     (*tp)++;
-    cpi->tplist[mb_row].stop = *tp;
+    if (mb_row < cm->mb_rows) cpi->tplist[mb_row].stop = *tp;
   }
 
   // debug output