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

Unified Diff: media/base/video_capture_types.cc

Issue 1211273005: Use safer IPC serializations in media_param_traits.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up unit tests Created 5 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 | « media/base/video_capture_types.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_capture_types.cc
diff --git a/media/base/video_capture_types.cc b/media/base/video_capture_types.cc
index c9dc6d9c2f0aa33274bee6d4cdff98c03fd678a9..91b6d1dab6528393f462b4df38ff9c6117cd61d0 100644
--- a/media/base/video_capture_types.cc
+++ b/media/base/video_capture_types.cc
@@ -42,7 +42,6 @@ bool VideoCaptureFormat::IsValid() const {
(frame_size.GetArea() < media::limits::kMaxCanvas) &&
(frame_rate >= 0.0f) &&
(frame_rate < media::limits::kMaxFramesPerSecond) &&
- (pixel_format >= 0) && (pixel_format < PIXEL_FORMAT_MAX) &&
(pixel_storage != PIXEL_STORAGE_TEXTURE ||
pixel_format == PIXEL_FORMAT_ARGB);
}
@@ -109,8 +108,6 @@ std::string VideoCaptureFormat::PixelFormatToString(VideoPixelFormat format) {
return "NV21";
case PIXEL_FORMAT_YV12:
return "YV12";
- case PIXEL_FORMAT_MAX:
- break;
}
NOTREACHED() << "Invalid VideoPixelFormat provided: " << format;
return std::string();
« no previous file with comments | « media/base/video_capture_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698