File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -312,8 +312,16 @@ CvCapture* cvCreateFileCapture_VFW (const char* filename)
312
312
class CvCaptureCAM_VFW : public CvCapture
313
313
{
314
314
public:
315
- CvCaptureCAM_VFW () { init (); }
316
- virtual ~CvCaptureCAM_VFW () { close (); }
315
+ CvCaptureCAM_VFW ()
316
+ {
317
+ CoInitialize (NULL );
318
+ init ();
319
+ }
320
+ virtual ~CvCaptureCAM_VFW ()
321
+ {
322
+ close ();
323
+ CoUninitialize ();
324
+ }
317
325
318
326
virtual bool open ( int index );
319
327
virtual void close ();
@@ -673,8 +681,16 @@ CvCapture* cvCreateCameraCapture_VFW( int index )
673
681
class CvVideoWriter_VFW : public CvVideoWriter
674
682
{
675
683
public:
676
- CvVideoWriter_VFW () { init (); }
677
- virtual ~CvVideoWriter_VFW () { close (); }
684
+ CvVideoWriter_VFW ()
685
+ {
686
+ CoInitialize (NULL );
687
+ init ();
688
+ }
689
+ virtual ~CvVideoWriter_VFW ()
690
+ {
691
+ close ();
692
+ CoUninitialize ();
693
+ }
678
694
679
695
virtual bool open ( const char * filename, int fourcc,
680
696
double fps, CvSize frameSize, bool isColor );
You can’t perform that action at this time.
0 commit comments