aboutsummaryrefslogtreecommitdiff
path: root/source/rotate.cc
diff options
context:
space:
mode:
authorFrank Barchard <fbarchard@google.com>2015-06-11 16:35:20 -0700
committerFrank Barchard <fbarchard@google.com>2015-06-11 16:35:20 -0700
commitee351bc2d5f129f1c9acea7c96193bc2c9e8c366 (patch)
tree0c364e0303c6eedeb4ff57620a6a5dc8cefbb3a1 /source/rotate.cc
parent4389070d3487beafe580c2d9e114956f47f19716 (diff)
downloadlibyuv-ee351bc2d5f129f1c9acea7c96193bc2c9e8c366.tar.gz
check height is non-zero
BUG=none TESTED=libyuv unittest with even width R=bcornell@google.com Review URL: https://webrtc-codereview.appspot.com/51219004.
Diffstat (limited to 'source/rotate.cc')
-rw-r--r--source/rotate.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/rotate.cc b/source/rotate.cc
index 4d8c40cc..e881cc03 100644
--- a/source/rotate.cc
+++ b/source/rotate.cc
@@ -838,7 +838,9 @@ void TransposePlane(const uint8* src, int src_stride,
i -= 8;
}
- TransposeWxH_C(src, src_stride, dst, dst_stride, width, i);
+ if (i > 0) {
+ TransposeWxH_C(src, src_stride, dst, dst_stride, width, i);
+ }
}
LIBYUV_API
@@ -1037,10 +1039,12 @@ void TransposeUV(const uint8* src, int src_stride,
i -= 8;
}
- TransposeUVWxH_C(src, src_stride,
- dst_a, dst_stride_a,
- dst_b, dst_stride_b,
- width, i);
+ if (i > 0) {
+ TransposeUVWxH_C(src, src_stride,
+ dst_a, dst_stride_a,
+ dst_b, dst_stride_b,
+ width, i);
+ }
}
LIBYUV_API