[vlc-commits] activex: vlccontrol2: improve some return values

Daniel Amm git at videolan.org
Sat May 9 23:48:47 CEST 2015


npapi-vlc | branch: master | Daniel Amm <da2424 at outlook.com> | Thu May  7 19:26:35 2015 +0200| [81577c1682a40ac476c9d52fd1a05d7f53a9cb33] | committer: Hugo Beauzée-Luyssen

activex: vlccontrol2: improve some return values

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=81577c1682a40ac476c9d52fd1a05d7f53a9cb33
---

 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;
 }



More information about the vlc-commits mailing list