Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(896)

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 858303002: Reject vp8 video having alpha and image planes of different sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/ffmpeg/ffmpeg_regression_tests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « media/ffmpeg/ffmpeg_regression_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698