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

Unified Diff: media/video/capture/video_capture_types.cc

Issue 332863002: Video Capture: Allow 0 fps frame rates to be deserializable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added passing 1 frame to MediaStreamVideoSourceTest.Use0FpsSupportedFormat Created 6 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 | « content/renderer/media/media_stream_video_source_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/video_capture_types.cc
diff --git a/media/video/capture/video_capture_types.cc b/media/video/capture/video_capture_types.cc
index 7dcc7a02e7f6fbefddc19d37109b51776974537b..fa78f427489154e52784345f34654ed68de15b70 100644
--- a/media/video/capture/video_capture_types.cc
+++ b/media/video/capture/video_capture_types.cc
@@ -9,7 +9,7 @@
namespace media {
VideoCaptureFormat::VideoCaptureFormat()
- : frame_rate(0), pixel_format(PIXEL_FORMAT_UNKNOWN) {}
+ : frame_rate(0.0f), pixel_format(PIXEL_FORMAT_UNKNOWN) {}
VideoCaptureFormat::VideoCaptureFormat(const gfx::Size& frame_size,
float frame_rate,
@@ -23,7 +23,7 @@ bool VideoCaptureFormat::IsValid() const {
(frame_size.height() < media::limits::kMaxDimension) &&
(frame_size.GetArea() >= 0) &&
(frame_size.GetArea() < media::limits::kMaxCanvas) &&
- (frame_rate > 0) &&
+ (frame_rate >= 0.0f) &&
(frame_rate < media::limits::kMaxFramesPerSecond) &&
(pixel_format >= PIXEL_FORMAT_UNKNOWN) &&
(pixel_format < PIXEL_FORMAT_MAX);
« no previous file with comments | « content/renderer/media/media_stream_video_source_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698