Commit 4405bc45 authored by magjed's avatar magjed Committed by Commit bot

Remove duplicated code in for loop in VideoCapture on Windows

Review URL: https://codereview.chromium.org/511213002

Cr-Commit-Position: refs/heads/master@{#292623}
parent 8eec55ab
......@@ -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)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment