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

Unified Diff: media/video/capture/win/video_capture_device_factory_win.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: Skip 0 fps supported format(s). 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 | « media/video/capture/video_capture_types.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/win/video_capture_device_factory_win.cc
diff --git a/media/video/capture/win/video_capture_device_factory_win.cc b/media/video/capture/win/video_capture_device_factory_win.cc
index 96d764d136225fca51485126ced45f8fb55a0940..a1c141ff10105064e8182b3334df05f1542ea003 100644
--- a/media/video/capture/win/video_capture_device_factory_win.cc
+++ b/media/video/capture/win/video_capture_device_factory_win.cc
@@ -298,10 +298,11 @@ static void GetDeviceSupportedFormatsDirectShow(
reinterpret_cast<VIDEOINFOHEADER*>(media_type->pbFormat);
format.frame_size.SetSize(h->bmiHeader.biWidth,
h->bmiHeader.biHeight);
+ if (!h->AvgTimePerFrame)
perkj_chrome 2014/06/19 11:23:35 So this does not add the format at all. Is that re
+ continue;
// Trust the frame rate from the VIDEOINFOHEADER.
- format.frame_rate = (h->AvgTimePerFrame > 0) ?
- kSecondsToReferenceTime / static_cast<float>(h->AvgTimePerFrame) :
- 0.0;
+ format.frame_rate =
+ kSecondsToReferenceTime / static_cast<float>(h->AvgTimePerFrame);
formats->push_back(format);
DVLOG(1) << device.name() << " resolution: "
« no previous file with comments | « media/video/capture/video_capture_types.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698