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

Unified Diff: media/video/capture/win/video_capture_device_factory_win.cc

Issue 511213002: Remove duplicated code in for loop in VideoCapture on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mcasas@s comments Created 6 years, 4 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: 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 75ee59d3bf495be332468550d2bb9ef22a16ef5d..9ba7a2ce792288dbbc965e5b5f1faea2f54a72de 100644
--- a/media/video/capture/win/video_capture_device_factory_win.cc
+++ b/media/video/capture/win/video_capture_device_factory_win.cc
@@ -299,11 +299,8 @@ static void GetDeviceSupportedFormatsMediaFoundation(
DWORD stream_index = 0;
ScopedComPtr<IMFMediaType> type;
- for (hr = reader->GetNativeMediaType(kFirstVideoStream, stream_index,
- type.Receive());
- SUCCEEDED(hr);
- hr = reader->GetNativeMediaType(kFirstVideoStream, stream_index,
- type.Receive())) {
+ while (SUCCEEDED(reader->GetNativeMediaType(
+ kFirstVideoStream, stream_index, type.Receive()))) {
UINT32 width, height;
hr = MFGetAttributeSize(type, MF_MT_FRAME_SIZE, &width, &height);
if (FAILED(hr)) {
« 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