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

Unified Diff: content/common/gpu/media/mac_video_decode_accelerator.mm

Issue 10837023: MacVideoDecodeAccelerator::Initialize() needs to inspect its |profile| param. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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: content/common/gpu/media/mac_video_decode_accelerator.mm
diff --git a/content/common/gpu/media/mac_video_decode_accelerator.mm b/content/common/gpu/media/mac_video_decode_accelerator.mm
index 94b67808df60cf78ecfa23be8ef778adb97cbc66..e07dacb16d2eefb3a5486fc57ff9383bb617aff7 100644
--- a/content/common/gpu/media/mac_video_decode_accelerator.mm
+++ b/content/common/gpu/media/mac_video_decode_accelerator.mm
@@ -102,6 +102,9 @@ MacVideoDecodeAccelerator::MacVideoDecodeAccelerator(
bool MacVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile) {
DCHECK(CalledOnValidThread());
+ if (profile < media::H264PROFILE_MIN || profile > media::H264PROFILE_MAX)
+ return false;
+
IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize();
if (!io_surface_support)
return false;
« 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