]> git.sesse.net Git - vlc/blobdiff - modules/codec/zvbi.c
Added teletext fields in es_forma_t.
[vlc] / modules / codec / zvbi.c
index 06bffe09b6335dafae11d0fc003f2ced2561757d..8f6c0524a385c8a04d245c637de4d26ce73ef8f0 100644 (file)
@@ -251,13 +251,10 @@ static int Open( vlc_object_t *p_this )
                      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 )
+    if( p_sys->i_wanted_page == 100 && p_dec->fmt_in.subs.teletext.i_magazine != -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->i_wanted_page = 100 * p_dec->fmt_in.subs.teletext.i_magazine +
+                               vbi_bcd2dec( p_dec->fmt_in.subs.teletext.i_page );
     }
     p_sys->i_wanted_subpage = VBI_ANY_SUBNO;