[vlc-devel] [PATCH] activex: vlccontrol2: improve some return values
Daniel Amm
d.amm at hotmail.de
Thu May 7 19:26:35 CEST 2015
---
activex/vlccontrol2.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp
index 0b5a352..14da696 100644
--- a/activex/vlccontrol2.cpp
+++ b/activex/vlccontrol2.cpp
@@ -449,7 +449,7 @@ STDMETHODIMP VLCAudio::put_track(long track)
{
auto tracks = _plug->get_player().get_mp().audioTrackDescription();
if ( track >= tracks.size() )
- return E_FAIL;
+ return E_INVALIDARG;
_plug->get_player().get_mp().setAudioTrack( tracks[track].id() );
return S_OK;
}
@@ -887,7 +887,7 @@ STDMETHODIMP VLCSubtitle::put_track(long spu)
{
auto tracks = _plug->get_player().get_mp().spuDescription();
if ( spu >= tracks.size() )
- return E_FAIL;
+ return E_INVALIDARG;
_plug->get_player().get_mp().setSpu( tracks[spu].id() );
return S_OK;
}
@@ -908,7 +908,7 @@ STDMETHODIMP VLCSubtitle::description(long nameID, BSTR* name)
auto tracks = _plug->get_player().get_mp().spuDescription();
if ( nameID >= tracks.size() )
- return E_FAIL;
+ return E_INVALIDARG;
*name = BSTRFromCStr( CP_UTF8, tracks[nameID].name().c_str() );
return (NULL == *name) ? E_OUTOFMEMORY : S_OK;
}
--
2.1.4
More information about the vlc-devel
mailing list