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

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 2086263003: Merge M52: "GpuVideoDecoder should reject playback of videos with alpha channel." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.cc
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index abc5295708de55e995bc07b80904adbb5c8d5473..941fd4f7ead54c480e2c5c44af323187dcd01c6a 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -182,6 +182,14 @@ void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config,
return;
}
+ // TODO(sandersd): This should be moved to capabilities if we ever have a
+ // hardware decoder which supports alpha formats.
+ if (config.format() == PIXEL_FORMAT_YV12A) {
+ DVLOG(1) << "Alpha transparency formats are not supported.";
+ bound_init_cb.Run(false);
+ return;
+ }
+
VideoDecodeAccelerator::Capabilities capabilities =
factories_->GetVideoDecodeAcceleratorCapabilities();
if (!IsProfileSupported(capabilities, config.profile(), config.coded_size(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698