Commit bf9ef35e authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

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
parent b226d557
......@@ -507,11 +507,14 @@ 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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment