Chromium Code Reviews| 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: " |