Commit f8e1e6f7 authored by Daniel Amm's avatar Daniel Amm Committed by Jean-Baptiste Kempf

activex: allow empty strings (fixes #14838)

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent fcd99cef
...@@ -1093,8 +1093,11 @@ STDMETHODIMP VLCVideo::get_aspectRatio(BSTR* aspect) ...@@ -1093,8 +1093,11 @@ STDMETHODIMP VLCVideo::get_aspectRatio(BSTR* aspect)
STDMETHODIMP VLCVideo::put_aspectRatio(BSTR aspect) STDMETHODIMP VLCVideo::put_aspectRatio(BSTR aspect)
{ {
if( NULL == aspect ) if( 0 == SysStringLen(aspect) )
return E_POINTER; {
_plug->get_player().get_mp().setAspectRatio( "" );
return S_OK;
}
char *psz_aspect = CStrFromBSTR(CP_UTF8, aspect); char *psz_aspect = CStrFromBSTR(CP_UTF8, aspect);
if( !psz_aspect ) if( !psz_aspect )
...@@ -1136,11 +1139,11 @@ STDMETHODIMP VLCVideo::get_crop(BSTR* geometry) ...@@ -1136,11 +1139,11 @@ STDMETHODIMP VLCVideo::get_crop(BSTR* geometry)
STDMETHODIMP VLCVideo::put_crop(BSTR geometry) STDMETHODIMP VLCVideo::put_crop(BSTR geometry)
{ {
if( NULL == geometry )
return E_POINTER;
if( 0 == SysStringLen(geometry) ) if( 0 == SysStringLen(geometry) )
return E_INVALIDARG; {
_plug->get_player().get_mp().setCropGeometry( "" );
return S_OK;
}
char *psz_geometry = CStrFromBSTR(CP_UTF8, geometry); char *psz_geometry = CStrFromBSTR(CP_UTF8, geometry);
if( !psz_geometry ) if( !psz_geometry )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment