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

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 2077023002: GpuVideoDecoder should reject playback of videos with alpha channel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TODO 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 9627a4b156523c5ab3eaa72a881cf893d566d097..5749596d1daccff7f4ae5a34a1f4a1c601e15160 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -184,6 +184,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