Commit 81577c16 authored by Daniel Amm's avatar Daniel Amm Committed by Hugo Beauzée-Luyssen

activex: vlccontrol2: improve some return values

Signed-off-by: 's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 0ed38fba
......@@ -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;
}
......
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