Index: media/filters/vpx_video_decoder.cc |
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc |
index b1415eea1d14ca668f040405fe79a197d5e7e1ab..40d4cc9952326186ec15ce50f8e335b716c500e9 100644 |
--- a/media/filters/vpx_video_decoder.cc |
+++ b/media/filters/vpx_video_decoder.cc |
@@ -432,6 +432,13 @@ bool VpxVideoDecoder::VpxDecode(const scoped_refptr<DecoderBuffer>& buffer, |
LOG(ERROR) << "Invalid output timestamp on alpha."; |
return false; |
} |
+ |
+ if (vpx_image_alpha->d_h != vpx_image->d_h || |
+ vpx_image_alpha->d_w != vpx_image->d_w) { |
+ LOG(ERROR) << "The alpha plane dimensions are not the same as the " |
+ "image dimensions."; |
+ return false; |
+ } |
} |
} |
@@ -503,8 +510,8 @@ void VpxVideoDecoder::CopyVpxImageTo(const vpx_image* vpx_image, |
return; |
} |
CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y], |
- vpx_image->stride[VPX_PLANE_Y], |
- vpx_image->d_h, |
+ vpx_image_alpha->stride[VPX_PLANE_Y], |
+ vpx_image_alpha->d_h, |
video_frame->get()); |
} |