Release _inputSendPin & _outputCapturePin before _captureFilter & _sinkFilter since they should depend on the filters.

The previous steps work fine for all the webcam, but have problem on SplitCam driver as in the issue report.
Anyway it's always good to de-initial with the reversing order to initialization.

BUG=3845
TEST=Manual
R=perkj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/25659004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7426 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
braveyao@webrtc.org 2014-10-13 02:11:55 +00:00
parent 7f7b0a1cdd
commit 651c05e4fc

View File

@ -45,13 +45,14 @@ VideoCaptureDS::~VideoCaptureDS()
if (_dvFilter)
_graphBuilder->RemoveFilter(_dvFilter);
}
RELEASE_AND_CLEAR(_inputSendPin);
RELEASE_AND_CLEAR(_outputCapturePin);
RELEASE_AND_CLEAR(_captureFilter); // release the capture device
RELEASE_AND_CLEAR(_sinkFilter);
RELEASE_AND_CLEAR(_dvFilter);
RELEASE_AND_CLEAR(_mediaControl);
RELEASE_AND_CLEAR(_inputSendPin);
RELEASE_AND_CLEAR(_outputCapturePin);
RELEASE_AND_CLEAR(_inputDvPin);
RELEASE_AND_CLEAR(_outputDvPin);