Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
b6f66cf9
Commit
b6f66cf9
authored
Mar 16, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32: add assertions for unchecked CoInitializeEx() calls
parent
86e1aff3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
8 deletions
+25
-8
modules/access/dshow/dshow.cpp
modules/access/dshow/dshow.cpp
+2
-1
modules/access/dtv/bdagraph.cpp
modules/access/dtv/bdagraph.cpp
+4
-1
modules/codec/dmo/dmo.c
modules/codec/dmo/dmo.c
+6
-2
modules/codec/mft.c
modules/codec/mft.c
+4
-1
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+3
-1
modules/gui/qt4/main_interface_win32.cpp
modules/gui/qt4/main_interface_win32.cpp
+4
-1
modules/video_output/msw/common.c
modules/video_output/msw/common.c
+2
-1
No files found.
modules/access/dshow/dshow.cpp
View file @
b6f66cf9
...
@@ -409,7 +409,8 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
...
@@ -409,7 +409,8 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
bool
b_use_video
=
true
;
bool
b_use_video
=
true
;
/* Initialize OLE/COM */
/* Initialize OLE/COM */
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
if
(
FAILED
(
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
))
)
vlc_assert_unreachable
();
var_Create
(
p_this
,
CFG_PREFIX
"config"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_this
,
CFG_PREFIX
"config"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_this
,
CFG_PREFIX
"tuner"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_this
,
CFG_PREFIX
"tuner"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
...
...
modules/access/dtv/bdagraph.cpp
View file @
b6f66cf9
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
# include <config.h>
# include <config.h>
#endif
#endif
#include <assert.h>
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_block.h>
#include <vlc_block.h>
#include "dtv/bdagraph.hpp"
#include "dtv/bdagraph.hpp"
...
@@ -372,7 +374,8 @@ BDAGraph::BDAGraph( vlc_object_t *p_this ):
...
@@ -372,7 +374,8 @@ BDAGraph::BDAGraph( vlc_object_t *p_this ):
p_scanning_tuner
=
NULL
;
p_scanning_tuner
=
NULL
;
p_grabber
=
NULL
;
p_grabber
=
NULL
;
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
if
(
FAILED
(
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
))
)
vlc_assert_unreachable
();
}
}
/*****************************************************************************
/*****************************************************************************
...
...
modules/codec/dmo/dmo.c
View file @
b6f66cf9
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
# include "config.h"
# include "config.h"
#endif
#endif
#include <assert.h>
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_plugin.h>
#include <vlc_codec.h>
#include <vlc_codec.h>
...
@@ -366,7 +368,8 @@ static int DecOpen( decoder_t *p_dec )
...
@@ -366,7 +368,8 @@ static int DecOpen( decoder_t *p_dec )
WAVEFORMATEX
*
p_wf
=
NULL
;
WAVEFORMATEX
*
p_wf
=
NULL
;
/* Initialize OLE/COM */
/* Initialize OLE/COM */
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
if
(
FAILED
(
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
))
)
vlc_assert_unreachable
();
if
(
LoadDMO
(
VLC_OBJECT
(
p_dec
),
&
hmsdmo_dll
,
&
p_dmo
,
&
p_dec
->
fmt_in
,
false
)
if
(
LoadDMO
(
VLC_OBJECT
(
p_dec
),
&
hmsdmo_dll
,
&
p_dmo
,
&
p_dec
->
fmt_in
,
false
)
!=
VLC_SUCCESS
)
!=
VLC_SUCCESS
)
...
@@ -1394,7 +1397,8 @@ static int EncOpen( vlc_object_t *p_this )
...
@@ -1394,7 +1397,8 @@ static int EncOpen( vlc_object_t *p_this )
HINSTANCE
hmsdmo_dll
=
NULL
;
HINSTANCE
hmsdmo_dll
=
NULL
;
/* Initialize OLE/COM */
/* Initialize OLE/COM */
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
if
(
FAILED
(
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
))
)
vlc_assert_unreachable
();
if
(
LoadDMO
(
p_this
,
&
hmsdmo_dll
,
&
p_dmo
,
&
p_enc
->
fmt_out
,
true
)
if
(
LoadDMO
(
p_this
,
&
hmsdmo_dll
,
&
p_dmo
,
&
p_enc
->
fmt_out
,
true
)
!=
VLC_SUCCESS
)
!=
VLC_SUCCESS
)
...
...
modules/codec/mft.c
View file @
b6f66cf9
...
@@ -37,6 +37,8 @@
...
@@ -37,6 +37,8 @@
# define STDCALL __stdcall
# define STDCALL __stdcall
#endif
#endif
#include <assert.h>
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_plugin.h>
#include <vlc_codec.h>
#include <vlc_codec.h>
...
@@ -1121,7 +1123,8 @@ int Open(vlc_object_t *p_this)
...
@@ -1121,7 +1123,8 @@ int Open(vlc_object_t *p_this)
if
(
!
p_sys
)
if
(
!
p_sys
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
if
(
FAILED
(
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
))
)
vlc_assert_unreachable
();
if
(
LoadMFTLibrary
(
&
p_sys
->
mf_handle
))
if
(
LoadMFTLibrary
(
&
p_sys
->
mf_handle
))
{
{
...
...
modules/gui/qt4/components/simple_preferences.cpp
View file @
b6f66cf9
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
#include <QSettings>
#include <QSettings>
#include <QtAlgorithms>
#include <QtAlgorithms>
#include <QDir>
#include <QDir>
#include <assert.h>
#include <math.h>
#include <math.h>
#define ICON_HEIGHT 48
#define ICON_HEIGHT 48
...
@@ -1255,7 +1256,8 @@ void SPrefsPanel::assoDialog()
...
@@ -1255,7 +1256,8 @@ void SPrefsPanel::assoDialog()
#endif
/* __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__ */
#endif
/* __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__ */
IApplicationAssociationRegistrationUI
*
p_appassoc
;
IApplicationAssociationRegistrationUI
*
p_appassoc
;
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
if
(
FAILED
(
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
))
)
vlc_assert_unreachable
();
if
(
S_OK
==
CoCreateInstance
(
CLSID_ApplicationAssociationRegistrationUI
,
if
(
S_OK
==
CoCreateInstance
(
CLSID_ApplicationAssociationRegistrationUI
,
NULL
,
CLSCTX_INPROC_SERVER
,
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
modules/gui/qt4/main_interface_win32.cpp
View file @
b6f66cf9
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
#include <QBitmap>
#include <QBitmap>
#include <vlc_windows_interfaces.h>
#include <vlc_windows_interfaces.h>
#include <assert.h>
#if defined(_WIN32) && HAS_QT5
#if defined(_WIN32) && HAS_QT5
# include <QWindow>
# include <QWindow>
# include <qpa/qplatformnativeinterface.h>
# include <qpa/qplatformnativeinterface.h>
...
@@ -115,7 +117,8 @@ void MainInterface::createTaskBarButtons()
...
@@ -115,7 +117,8 @@ void MainInterface::createTaskBarButtons()
FIXME:the play button's picture doesn't changed to pause when clicked
FIXME:the play button's picture doesn't changed to pause when clicked
*/
*/
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
if
(
FAILED
(
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
))
)
vlc_assert_unreachable
();
if
(
S_OK
==
CoCreateInstance
(
CLSID_TaskbarList
,
if
(
S_OK
==
CoCreateInstance
(
CLSID_TaskbarList
,
NULL
,
CLSCTX_INPROC_SERVER
,
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
modules/video_output/msw/common.c
View file @
b6f66cf9
...
@@ -283,7 +283,8 @@ static void CommonChangeThumbnailClip(vout_display_t *vd, bool show)
...
@@ -283,7 +283,8 @@ static void CommonChangeThumbnailClip(vout_display_t *vd, bool show)
if
(
!
GetVersionEx
(
&
winVer
)
||
winVer
.
dwMajorVersion
<=
5
)
if
(
!
GetVersionEx
(
&
winVer
)
||
winVer
.
dwMajorVersion
<=
5
)
return
;
return
;
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
if
(
FAILED
(
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
))
)
vlc_assert_unreachable
();
void
*
ptr
;
void
*
ptr
;
if
(
S_OK
==
CoCreateInstance
(
&
CLSID_TaskbarList
,
if
(
S_OK
==
CoCreateInstance
(
&
CLSID_TaskbarList
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment