]> granicus.if.org Git - libvpx/commitdiff
A fix for crashes when #macroblock rows is odd.
authorDeb Mukherjee <debargha@google.com>
Thu, 18 Oct 2012 19:00:23 +0000 (12:00 -0700)
committerDeb Mukherjee <debargha@google.com>
Thu, 18 Oct 2012 19:00:23 +0000 (12:00 -0700)
Change-Id: If9fc2df4051ccfb8d804dae9d1be08d12d0f81ce

vp8/encoder/encodeframe.c

index 8a2c5617537e5b08133d19d6a2042eec5d6f5d4b..0a25f8e412e7e7bb9aa20b54a10fd679cd30b416 100644 (file)
@@ -1064,7 +1064,7 @@ static void encode_sb(VP8_COMP *cpi,
       
       (*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 @@ static void encode_sb(VP8_COMP *cpi,
 #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