[vlc-commits] demux: ts: fix broken mpeg-sl regression (fix #16809)

Francois Cartegnie git at videolan.org
Mon Apr 11 18:48:46 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Apr 11 18:45:52 2016 +0200| [f110737a6d99af4d7748cb3898b6501d34bdfca2] | committer: Francois Cartegnie

demux: ts: fix broken mpeg-sl regression (fix #16809)

Worked unintentionally in 2.2.x

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

 modules/demux/mpeg/ts_psi.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mpeg/ts_psi.c b/modules/demux/mpeg/ts_psi.c
index da7d79a..894b822 100644
--- a/modules/demux/mpeg/ts_psi.c
+++ b/modules/demux/mpeg/ts_psi.c
@@ -348,10 +348,14 @@ static void SetupISO14496Descriptors( demux_t *p_demux, ts_pes_t *p_pes,
         switch( p_dr->i_tag )
         {
             case 0x1f: /* FMC Descriptor */
-                while( i_length >= 3 && !p_es->i_sl_es_id )
+                while( i_length >= 2 /* see below */ && !p_es->i_sl_es_id )
                 {
                     p_es->i_sl_es_id = ( p_dr->p_data[0] << 8 ) | p_dr->p_data[1];
                     /* FIXME: map all ids and flexmux channels */
+                    /* Handle broken streams with 2 byte 0x1F descriptors
+                     * see samples/A-codecs/AAC/freetv_aac_latm.txt */
+                    if( i_length == 2 )
+                        break;
                     i_length -= 3;
                     msg_Dbg( p_demux, "     - found FMC_descriptor mapping es_id=%"PRIu16, p_es->i_sl_es_id );
                 }



More information about the vlc-commits mailing list