tiny error handling bug in vtkWin32VideoSource.cxx
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I found something strange in the source code of vtkWin32VideoSource.cxx which looks as a bug to me. In Initialize() a window is created. This will be retried ten times on error. If it still failed it follows that i = 10 but the routine then checks for i > 32 to return immediatley.
Ok, I am sure, this is a tiny bug, probably this wont really happen very often...
for (i = 1; i <= 10; i++) { if (RegisterClass(&wc)) { break; } // try again with a slightly different name sprintf(this->WndClassName,"VTKVideo %d",i); }
if (i > 32)
{
vtkErrorMacro(<< "Initialize: failed to register VTKVideo class"
<< " (" << GetLastError() << ")");
return;
}
Kind regards, Mario