handle corner case of zero-dimensions

Change-Id: I943a335b92b5ee6c2980c2ba9d4092f0b79f9a6b
This commit is contained in:
Pascal Massimino 2010-12-20 12:09:07 -08:00
parent 280c36583f
commit 2330522cff

View File

@ -191,6 +191,8 @@ static void CustomPut(const VP8Io* io) {
const int uv_w = (w + 1) / 2; const int uv_w = (w + 1) / 2;
assert(!(io->mb_y & 1)); assert(!(io->mb_y & 1));
if (w <= 0 || mb_h <= 0) return;
if (p->mode == MODE_YUV) { if (p->mode == MODE_YUV) {
uint8_t* const y_dst = p->output + io->mb_y * p->stride; uint8_t* const y_dst = p->output + io->mb_y * p->stride;
uint8_t* const u_dst = p->u + (io->mb_y >> 1) * p->u_stride; uint8_t* const u_dst = p->u + (io->mb_y >> 1) * p->u_stride;