[vlc-devel] [PATCH] teletext: Check spu-es instead of teletext-es

Julian Scheel julian at jusst.de
Thu Feb 6 15:29:58 CET 2014


toggle_teletext sets spu-es to the first subtitle track listed in teletext-es.
teletext-es itself is not set and hence returns -1 if more than one track is
available. So query for spu-es and also check for it to be unequal to -1, as
a spu-es of -1 causes a segfault.

Signed-off-by: Julian Scheel <julian at jusst.de>
---
 lib/video.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/video.c b/lib/video.c
index 43471b9..fc4a565 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -464,8 +464,9 @@ void libvlc_video_set_teletext( libvlc_media_player_t *p_mi, int i_page )
         return;
     }
 
-    telx = var_GetInteger( p_input_thread, "teletext-es" );
-    if( input_GetEsObjects( p_input_thread, telx, &p_zvbi, NULL, NULL )
+    telx = var_GetInteger( p_input_thread, "spu-es" );
+    if( telx > -1 &&
+        input_GetEsObjects( p_input_thread, telx, &p_zvbi, NULL, NULL )
         == VLC_SUCCESS )
     {
         var_SetInteger( p_zvbi, "vbi-page", i_page );
-- 
1.8.5.3




More information about the vlc-devel mailing list