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

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

Issue 655293002: Win Video Capture: Check returned AM_MEDIA_TYPE pointer before comparing it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 81780d569d324706b04777d6899fe05c665326d1..fee96b8ef72c98da5f94567fffa95e3e7113ca79 100644
--- a/media/video/capture/win/video_capture_device_factory_win.cc
+++ b/media/video/capture/win/video_capture_device_factory_win.cc
@@ -275,7 +275,7 @@ static void GetDeviceSupportedFormatsDirectShow(const Name& device,
hr = stream_config->GetStreamCaps(i, media_type.Receive(), caps.get());
// GetStreamCaps() may return S_FALSE, so don't use FAILED() or SUCCEED()
// macros here since they'll trigger incorrectly.
- if (hr != S_OK) {
+ if (hr != S_OK || !media_type.get()) {
tommi (sloooow) - chröme 2014/10/15 17:23:30 FYI - I checked the bug and just to confirm - this
DLOG(ERROR) << "GetStreamCaps failed: "
<< logging::SystemErrorCodeToString(hr);
return;
« 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