npapi-vlc | branch: master | Daniel Amm <[email protected]> | Tue Jun  6 
17:30:58 2017 +0200| [ce8f447440589ee1c73831b546937972b6a099fc] | committer: 
Hugo Beauzée-Luyssen

Fix toggleTeletext in 3.0 builds

Since commit 76c74ca0 in vlc.git, 0 is used to disable teletext.

Signed-off-by: Hugo Beauzée-Luyssen <[email protected]>

> https://code.videolan.org/videolan/npapi-vlc/commit/ce8f447440589ee1c73831b546937972b6a099fc
---

 activex/vlccontrol2.cpp       | 4 ++--
 npapi/npruntime/npolibvlc.cpp | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp
index 853948b..2ec4f8c 100644
--- a/activex/vlccontrol2.cpp
+++ b/activex/vlccontrol2.cpp
@@ -1273,10 +1273,10 @@ STDMETHODIMP VLCVideo::toggleFullscreen()
 STDMETHODIMP VLCVideo::toggleTeletext()
 {
 #if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
-    if( _plug->get_player().get_mp().teletext() == -1 )
+    if( _plug->get_player().get_mp().teletext() == 0 )
         _plug->get_player().get_mp().setTeletext( 100 );
     else
-        _plug->get_player().get_mp().setTeletext( -1 );
+        _plug->get_player().get_mp().setTeletext( 0 );
     return S_OK;
 #else
     _plug->get_player().get_mp().toggleTeletext();
diff --git a/npapi/npruntime/npolibvlc.cpp b/npapi/npruntime/npolibvlc.cpp
index 55aa27e..81bab1d 100644
--- a/npapi/npruntime/npolibvlc.cpp
+++ b/npapi/npruntime/npolibvlc.cpp
@@ -1546,10 +1546,10 @@ LibvlcVideoNPObject::invoke(int index, const NPVariant 
*,
                 if( argCount == 0 )
                 {
 #if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
-                    if ( p_plugin->getMD().teletext() == -1 )
+                    if ( p_plugin->getMD().teletext() == 0 )
                         p_plugin->getMD().setTeletext( 100 );
                     else
-                        p_plugin->getMD().setTeletext( -1 );
+                        p_plugin->getMD().setTeletext( 0 );
 #else
                     p_plugin->getMD().toggleTeletext();
 #endif

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to