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
19313bbf
Commit
19313bbf
authored
Sep 16, 2005
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: bug fixing, clean-up
parent
9131dbf7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
20 deletions
+32
-20
activex/persistpropbag.cpp
activex/persistpropbag.cpp
+2
-1
activex/persiststorage.cpp
activex/persiststorage.cpp
+3
-3
activex/persiststreaminit.cpp
activex/persiststreaminit.cpp
+10
-5
activex/plugin.cpp
activex/plugin.cpp
+12
-7
activex/plugin.h
activex/plugin.h
+1
-1
activex/utils.cpp
activex/utils.cpp
+2
-2
activex/vlccontrol.cpp
activex/vlccontrol.cpp
+2
-1
No files found.
activex/persistpropbag.cpp
View file @
19313bbf
...
...
@@ -198,7 +198,8 @@ STDMETHODIMP VLCPersistPropertyBag::Save(LPPROPERTYBAG pPropBag, BOOL fClearDirt
pPropBag
->
Write
(
OLESTR
(
"ExtentHeight"
),
&
value
);
V_VT
(
&
value
)
=
VT_BSTR
;
V_BSTR
(
&
value
)
=
SysAllocString
(
_p_instance
->
getMRL
());
V_BSTR
(
&
value
)
=
SysAllocStringLen
(
_p_instance
->
getMRL
(),
SysStringLen
(
_p_instance
->
getMRL
()));
pPropBag
->
Write
(
OLESTR
(
"MRL"
),
&
value
);
VariantClear
(
&
value
);
...
...
activex/persiststorage.cpp
View file @
19313bbf
...
...
@@ -40,12 +40,12 @@ STDMETHODIMP VLCPersistStorage::IsDirty(void)
return
_p_instance
->
isDirty
()
?
S_OK
:
S_FALSE
;
};
STDMETHODIMP
VLCPersistStorage
::
InitNew
(
IStorage
*
pStg
)
STDMETHODIMP
VLCPersistStorage
::
InitNew
(
LPSTORAGE
pStg
)
{
return
_p_instance
->
onInit
();
};
STDMETHODIMP
VLCPersistStorage
::
Load
(
IStorage
*
pStg
)
STDMETHODIMP
VLCPersistStorage
::
Load
(
LPSTORAGE
pStg
)
{
if
(
NULL
==
pStg
)
return
E_INVALIDARG
;
...
...
@@ -69,7 +69,7 @@ STDMETHODIMP VLCPersistStorage::Load(IStorage *pStg)
return
result
;
};
STDMETHODIMP
VLCPersistStorage
::
Save
(
IStorage
*
pStg
,
BOOL
fSameAsLoad
)
STDMETHODIMP
VLCPersistStorage
::
Save
(
LPSTORAGE
pStg
,
BOOL
fSameAsLoad
)
{
if
(
NULL
==
pStg
)
return
E_INVALIDARG
;
...
...
activex/persiststreaminit.cpp
View file @
19313bbf
...
...
@@ -76,6 +76,7 @@ public:
VARIANT
arg
;
V_VT
(
&
arg
)
=
VT_BSTR
;
V_BSTR
(
&
arg
)
=
bstr
;
VariantInit
(
&
_v
);
VariantCopy
(
&
_v
,
&
arg
);
};
...
...
@@ -153,7 +154,8 @@ public:
inline
bool
operator
==
(
const
AxVLCWSTR
&
s
)
const
{
return
compareNoCase
(
s
.
wstr
())
==
0
;
return
size
()
==
s
.
size
()
?
(
compareNoCase
(
s
.
wstr
())
==
0
)
:
false
;
};
inline
bool
operator
==
(
LPCWSTR
s
)
const
...
...
@@ -247,12 +249,15 @@ public:
if
(
notfound
!=
iter
)
{
VARTYPE
vtype
=
V_VT
(
pVar
);
VariantCopy
(
pVar
,
const_cast
<
VARIANTARG
*>
((
*
iter
).
second
.
variantArg
()));
if
(
(
V_VT
(
pVar
)
!=
vtype
)
&&
FAILED
(
VariantChangeType
(
pVar
,
pVar
,
0
,
vtype
))
)
VARIANTARG
v
;
VariantInit
(
&
v
);
VariantCopy
(
&
v
,
const_cast
<
VARIANTARG
*>
((
*
iter
).
second
.
variantArg
()));
if
(
(
V_VT
(
&
v
)
!=
vtype
)
&&
FAILED
(
VariantChangeType
(
&
v
,
&
v
,
0
,
vtype
))
)
{
VariantClear
(
pVar
);
VariantClear
(
&
v
);
return
E_FAIL
;
}
*
pVar
=
v
;
return
S_OK
;
}
else
...
...
@@ -400,7 +405,7 @@ private:
return
result
;
};
static
HRESULT
ReadProperty
(
LPSTREAM
pStm
,
AxVLCPropertyPair
**
prop
)
HRESULT
ReadProperty
(
LPSTREAM
pStm
,
AxVLCPropertyPair
**
prop
)
{
HRESULT
result
;
...
...
activex/plugin.cpp
View file @
19313bbf
...
...
@@ -102,7 +102,8 @@ static LRESULT CALLBACK VLCVideoClassWndProc(HWND hWnd, UINT uMsg, WPARAM wParam
VLCPluginClass
::
VLCPluginClass
(
LONG
*
p_class_ref
,
HINSTANCE
hInstance
)
:
_p_class_ref
(
p_class_ref
),
_hinstance
(
hInstance
)
_hinstance
(
hInstance
),
_inplace_picture
(
NULL
)
{
WNDCLASS
wClass
;
...
...
@@ -303,7 +304,7 @@ VLCPlugin::~VLCPlugin()
if
(
_p_pict
)
_p_pict
->
Release
();
SysFreeString
(
_bstr_mrl
)
,
SysFreeString
(
_bstr_mrl
)
;
_p_class
->
Release
();
};
...
...
@@ -473,8 +474,7 @@ HRESULT VLCPlugin::onInit(void)
{
if
(
0
==
_i_vlc
)
{
//#ifdef ACTIVEX_DEBUG
#if 1
#ifdef ACTIVEX_DEBUG
char
*
ppsz_argv
[]
=
{
"vlc"
,
"-vv"
,
"--fast-mutex"
,
"--win9x-cv-method=1"
};
#else
char
*
ppsz_argv
[]
=
{
"vlc"
,
"-vv"
};
...
...
@@ -502,6 +502,11 @@ HRESULT VLCPlugin::onInit(void)
#endif
_i_vlc
=
VLC_Create
();
if
(
_i_vlc
<
0
)
{
_i_vlc
=
0
;
return
E_FAIL
;
}
if
(
VLC_Init
(
_i_vlc
,
sizeof
(
ppsz_argv
)
/
sizeof
(
char
*
),
ppsz_argv
)
)
{
...
...
@@ -519,7 +524,7 @@ HRESULT VLCPlugin::onLoad(void)
if
(
_b_mute
)
VLC_VolumeMute
(
_i_vlc
);
if
(
NULL
!=
_bstr_mrl
)
if
(
SysStringLen
(
_bstr_mrl
)
>
0
)
{
/*
** try to combine MRL with client site moniker, which for Internet Explorer
...
...
@@ -527,7 +532,7 @@ HRESULT VLCPlugin::onLoad(void)
** is a relative URL, we should end up with an absolute URL
*/
IOleClientSite
*
pClientSite
;
if
(
SUCCEEDED
(
vlcOleObject
->
GetClientSite
(
&
pClientSite
))
)
if
(
SUCCEEDED
(
vlcOleObject
->
GetClientSite
(
&
pClientSite
))
&&
(
NULL
!=
pClientSite
)
)
{
IBindCtx
*
pBC
=
0
;
if
(
SUCCEEDED
(
CreateBindCtx
(
0
,
&
pBC
))
)
...
...
@@ -549,7 +554,7 @@ HRESULT VLCPlugin::onLoad(void)
URL_ESCAPE_UNSAFE
))
)
{
SysFreeString
(
_bstr_mrl
);
_bstr_mrl
=
SysAllocString
(
url
);
_bstr_mrl
=
SysAllocString
Len
(
url
,
len
);
}
CoTaskMemFree
(
url
);
}
...
...
activex/plugin.h
View file @
19313bbf
...
...
@@ -90,7 +90,7 @@ public:
void
setMRL
(
BSTR
mrl
)
{
SysFreeString
(
_bstr_mrl
);
_bstr_mrl
=
SysAllocString
(
mrl
);
_bstr_mrl
=
SysAllocString
Len
(
mrl
,
SysStringLen
(
mrl
)
);
setDirty
(
TRUE
);
};
const
BSTR
getMRL
(
void
)
{
return
_bstr_mrl
;
};
...
...
activex/utils.cpp
View file @
19313bbf
...
...
@@ -52,7 +52,7 @@ char *CStrFromBSTR(int codePage, BSTR bstr)
BSTR
BSTRFromCStr
(
int
codePage
,
const
char
*
s
)
{
int
wideLen
=
MultiByteToWideChar
(
codePage
,
0
,
s
,
-
1
,
NULL
,
0
);
if
(
wideLen
)
if
(
wideLen
>
0
)
{
WCHAR
*
wideStr
=
(
WCHAR
*
)
CoTaskMemAlloc
(
wideLen
*
sizeof
(
WCHAR
));
if
(
NULL
!=
wideStr
)
...
...
@@ -61,7 +61,7 @@ BSTR BSTRFromCStr(int codePage, const char *s)
ZeroMemory
(
wideStr
,
wideLen
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
codePage
,
0
,
s
,
-
1
,
wideStr
,
wideLen
);
bstr
=
SysAllocString
(
wideStr
);
bstr
=
SysAllocString
Len
(
wideStr
,
wideLen
);
free
(
wideStr
);
return
bstr
;
...
...
activex/vlccontrol.cpp
View file @
19313bbf
...
...
@@ -825,7 +825,8 @@ STDMETHODIMP VLCControl::get_MRL(BSTR *mrl)
if
(
NULL
==
mrl
)
return
E_POINTER
;
*
mrl
=
SysAllocString
(
_p_instance
->
getMRL
());
*
mrl
=
SysAllocStringLen
(
_p_instance
->
getMRL
(),
SysStringLen
(
_p_instance
->
getMRL
()));
return
NOERROR
;
};
...
...
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