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

Side by Side Diff: media/video/capture/win/sink_input_pin_win.cc

Issue 10830013: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix 2. Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/video/capture/win/sink_input_pin_win.h" 5 #include "media/video/capture/win/sink_input_pin_win.h"
6 6
7 #include <cstring>
8
7 // Avoid including strsafe.h via dshow as it will cause build warnings. 9 // Avoid including strsafe.h via dshow as it will cause build warnings.
8 #define NO_DSHOW_STRSAFE 10 #define NO_DSHOW_STRSAFE
9 #include <dshow.h> 11 #include <dshow.h>
10 12
11 #include "base/logging.h" 13 #include "base/logging.h"
12 14
13 namespace media { 15 namespace media {
14 16
15 const REFERENCE_TIME kSecondsToReferenceTime = 10000000; 17 const REFERENCE_TIME kSecondsToReferenceTime = 10000000;
16 18
17 SinkInputPin::SinkInputPin(IBaseFilter* filter, 19 SinkInputPin::SinkInputPin(IBaseFilter* filter,
18 SinkFilterObserver* observer) 20 SinkFilterObserver* observer)
19 : observer_(observer), 21 : observer_(observer),
20 PinBase(filter) { 22 PinBase(filter) {
23 memset(&requested_capability_, 0, sizeof(requested_capability_));
24 memset(&resulting_capability_, 0, sizeof(resulting_capability_));
21 } 25 }
22 26
23 SinkInputPin::~SinkInputPin() {} 27 SinkInputPin::~SinkInputPin() {}
24 28
25 bool SinkInputPin::GetValidMediaType(int index, AM_MEDIA_TYPE* media_type) { 29 bool SinkInputPin::GetValidMediaType(int index, AM_MEDIA_TYPE* media_type) {
26 if (media_type->cbFormat < sizeof(VIDEOINFOHEADER)) 30 if (media_type->cbFormat < sizeof(VIDEOINFOHEADER))
27 return false; 31 return false;
28 32
29 VIDEOINFOHEADER* pvi = 33 VIDEOINFOHEADER* pvi =
30 reinterpret_cast<VIDEOINFOHEADER*>(media_type->pbFormat); 34 reinterpret_cast<VIDEOINFOHEADER*>(media_type->pbFormat);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 resulting_capability_.color = VideoCaptureCapability::kColorUnknown; 149 resulting_capability_.color = VideoCaptureCapability::kColorUnknown;
146 resulting_capability_.expected_capture_delay = 0; 150 resulting_capability_.expected_capture_delay = 0;
147 resulting_capability_.interlaced = false; 151 resulting_capability_.interlaced = false;
148 } 152 }
149 153
150 const VideoCaptureCapability& SinkInputPin::ResultingCapability() { 154 const VideoCaptureCapability& SinkInputPin::ResultingCapability() {
151 return resulting_capability_; 155 return resulting_capability_;
152 } 156 }
153 157
154 } // namespace media 158 } // namespace media
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.cc ('k') | sandbox/linux/seccomp-bpf/sandbox_bpf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698