[vlc-commits] demux: ts: really fix teletext es creation (#23687)

Francois Cartegnie git at videolan.org
Tue Feb 4 15:35:54 CET 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb  3 16:18:55 2020 +0100| [27b277680e65eeaf8893dc5a1c1f6441e0e53b88] | committer: Francois Cartegnie

demux: ts: really fix teletext es creation (#23687)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27b277680e65eeaf8893dc5a1c1f6441e0e53b88
---

 modules/demux/mpeg/ts_psi.c | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/modules/demux/mpeg/ts_psi.c b/modules/demux/mpeg/ts_psi.c
index fee488c22c..a857e37e16 100644
--- a/modules/demux/mpeg/ts_psi.c
+++ b/modules/demux/mpeg/ts_psi.c
@@ -889,10 +889,23 @@ static void PMTSetupEsTeletext( demux_t *p_demux, ts_stream_t *p_pes,
             for( unsigned i = 0; i < i_page; i++ )
             {
                 const ts_teletext_page_t *p = &p_page[i];
-                if(p->i_magazine !=1 && pass == TXT_INDEX_PAGE)
-                    continue;
-                if((p->i_type == 0x02 || p->i_type == 0x05) && pass != TXT_SUBTITLES)
-                    continue;
+                switch(p->i_type)
+                {
+                    case 0x01:
+                        if(pass != TXT_INDEX_PAGE)
+                            continue;
+                        break;
+                    case 0x02:
+                    case 0x05:
+                        if(pass != TXT_SUBTITLES)
+                            continue;
+                        break;
+                    default:
+                        if(pass != TXT_OTHER)
+                            continue;
+                        break;
+                }
+
                 /* */
                 if( !p_page_es )
                 {



More information about the vlc-commits mailing list