Commit 344612b3 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

zvbi: Use the "initial page" as signaled by the TS demuxer.

This way the TS demux can create multiple tracks that will take you straight to the subtitles, program listings etc.
parent 9beed2d7
...@@ -197,6 +197,16 @@ static int Open( vlc_object_t *p_this ) ...@@ -197,6 +197,16 @@ static int Open( vlc_object_t *p_this )
var_AddCallback( p_dec, "vbi-page", var_AddCallback( p_dec, "vbi-page",
RequestPage, p_sys ); RequestPage, p_sys );
/* Check if the Teletext track has a known "initial page". */
if( p_sys->i_wanted_page == 100 && p_dec->fmt_in.subs.dvb.i_id != -1 )
{
int i_wanted_magazine = p_dec->fmt_in.subs.dvb.i_id >> 16;
if( i_wanted_magazine == 0 )
i_wanted_magazine = 8;
p_sys->i_wanted_page = vbi_bcd2dec(p_dec->fmt_in.subs.dvb.i_id & 0xff);
p_sys->i_wanted_page += 100*i_wanted_magazine;
}
p_sys->b_opaque = var_CreateGetBool( p_dec, "vbi-opaque" ); p_sys->b_opaque = var_CreateGetBool( p_dec, "vbi-opaque" );
var_AddCallback( p_dec, "vbi-opaque", Opaque, p_sys ); var_AddCallback( p_dec, "vbi-opaque", Opaque, p_sys );
......
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