[vlc-commits] lib/video: fix invalid id in input_GetEsObjects
Thomas Guillem
git at videolan.org
Tue Mar 14 10:44:20 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 14 10:20:36 2017 +0100| [352dcbde63fde8cb6b3a8c0618358b61f126b06f] | committer: Thomas Guillem
lib/video: fix invalid id in input_GetEsObjects
This fixes a SEGFAULT when calling libvlc_video_set_teletext when there is no
teletext-es.
Fixes #11854
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=352dcbde63fde8cb6b3a8c0618358b61f126b06f
---
lib/video.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/video.c b/lib/video.c
index 46f9935..9cadc36 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -507,11 +507,15 @@ void libvlc_video_set_teletext( libvlc_media_player_t *p_mi, int i_page )
}
telx = var_GetInteger( p_input_thread, "teletext-es" );
- if( input_GetEsObjects( p_input_thread, telx, &p_zvbi, NULL, NULL )
- == VLC_SUCCESS )
+ if( telx >= 0 )
{
- var_SetInteger( p_zvbi, "vbi-page", i_page );
- vlc_object_release( p_zvbi );
+ if( input_GetEsObjects( p_input_thread, telx, &p_zvbi, NULL, NULL )
+ == VLC_SUCCESS )
+ {
+ var_SetInteger( p_zvbi, "vbi-page", i_page );
+ vlc_object_release( p_zvbi );
+ }
+ }
}
vlc_object_release( p_input_thread );
}
More information about the vlc-commits
mailing list