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

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

Issue 12185022: Fix how we handle an empty capabilities list when enumerating video streams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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_mf_win.cc
diff --git a/media/video/capture/win/video_capture_device_mf_win.cc b/media/video/capture/win/video_capture_device_mf_win.cc
index 96bfdb284c566fdb5c427140903bbf64a5935a8f..e984bb11488f5f6f83f4955b1429e04e94cf5903 100644
--- a/media/video/capture/win/video_capture_device_mf_win.cc
+++ b/media/video/capture/win/video_capture_device_mf_win.cc
@@ -138,7 +138,7 @@ HRESULT FillCapabilities(IMFSourceReader* source,
type.Release();
}
- if (SUCCEEDED(hr) && capabilities->empty())
+ if (capabilities->empty() && (SUCCEEDED(hr) || hr == MF_E_NO_MORE_TYPES))
hr = HRESULT_FROM_WIN32(ERROR_EMPTY);
return (hr == MF_E_NO_MORE_TYPES) ? S_OK : 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