[vlc-devel] [PATCH 3/4] Fix toggleTeletext in 3.0 builds

Daniel Amm da2424 at t-online.de
Tue Jun 6 17:30:58 CEST 2017


Since commit 76c74ca0 in vlc.git, 0 is used to disable teletext.
---
 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
-- 
2.11.1.windows.1



More information about the vlc-devel mailing list