File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -877,14 +877,12 @@ void videoDevice::NukeDownstream(IBaseFilter *pBF){
877
877
878
878
void videoDevice::destroyGraph (){
879
879
HRESULT hr = 0 ;
880
- // int FuncRetval=0;
881
- // int NumFilters=0;
882
880
883
881
int i = 0 ;
884
882
while (hr == NOERROR)
885
883
{
886
884
IEnumFilters * pEnum = 0 ;
887
- ULONG cFetched;
885
+ ULONG cFetched = 0 ;
888
886
889
887
// We must get the enumerator again every time because removing a filter from the graph
890
888
// invalidates the enumerator. We always get only the first filter from each enumerator.
@@ -917,9 +915,11 @@ void videoDevice::destroyGraph(){
917
915
pFilter->Release ();
918
916
pFilter = NULL ;
919
917
}
920
- else break ;
921
918
pEnum->Release ();
922
919
pEnum = NULL ;
920
+
921
+ if (cFetched == 0 )
922
+ break ;
923
923
i++;
924
924
}
925
925
You can’t perform that action at this time.
0 commit comments