Index: media/base/yuv_convert.cc |
diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc |
index 8d5073bfc2bc25d4fe47181e82ff0cc085985b55..ed9bed4cc87e0c9a5bfba43171b3aa606fcdfd9b 100644 |
--- a/media/base/yuv_convert.cc |
+++ b/media/base/yuv_convert.cc |
@@ -335,8 +335,9 @@ void ScaleYUVToRGB32WithRect(const uint8* y_buf, |
// Determine the parts of the Y, U and V buffers to interpolate. |
int source_y_left = source_left >> kFractionBits; |
- int source_y_right = (source_right >> kFractionBits) + 2; |
- DCHECK(source_y_right <= source_width); |
+ int source_y_right = std::min( |
+ (source_right >> kFractionBits) + 2, |
+ source_width + 1); |
Wez
2012/02/03 22:40:35
Not sure why this needed to change?
alexeypa (please no reviews)
2012/02/03 23:29:35
Because I hit this DCHECK on a legitimate call (Yu
|
int source_uv_left = source_y_left / 2; |
int source_uv_right = std::min( |