[vlc-commits] demux: ts: check tag extension (fix #17755)

Francois Cartegnie git at videolan.org
Wed Dec 7 19:40:36 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec  7 19:34:59 2016 +0100| [2db5eb6551f7709aa923b8937a0bed522a5e052c] | committer: Francois Cartegnie

demux: ts: check tag extension (fix #17755)

Conflicts with opus

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

 modules/demux/mpeg/ts_psi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mpeg/ts_psi.c b/modules/demux/mpeg/ts_psi.c
index 5e125a6..260cf53 100644
--- a/modules/demux/mpeg/ts_psi.c
+++ b/modules/demux/mpeg/ts_psi.c
@@ -377,7 +377,7 @@ static void SetupAudioExtendedDescriptors( demux_t *p_demux, ts_pes_es_t *p_es,
         p_demux->p_sys->standard == TS_STANDARD_DVB )
     {
         const dvbpsi_descriptor_t *p_dr = PMTEsFindDescriptor( p_dvbpsies, 0x7F );
-        if( p_dr && p_dr->i_length > 1 )
+        if( p_dr && p_dr->i_length > 1 && p_dr->p_data[0] == 0x06 /* Tag extension */ )
         {
             static const char *editorial_classification_coding[] = {
                 N_("Main audio"),
@@ -942,7 +942,8 @@ static void PMTSetupEs0x06( demux_t *p_demux, ts_pes_t *p_pes,
         p_fmt->i_cat = AUDIO_ES;
         p_fmt->i_codec = VLC_CODEC_A52;
     }
-    else if( (desc = PMTEsFindDescriptor( p_dvbpsies, 0x7f ) ) && desc->i_length >= 2 &&
+    else if( (desc = PMTEsFindDescriptor( p_dvbpsies, 0x7f ) ) &&
+             desc->i_length >= 2 && desc->p_data[0] == 0x80 &&
               PMTEsHasRegistration(p_demux, p_dvbpsies, "Opus"))
     {
         OpusSetup(p_demux, desc->p_data, desc->i_length, p_fmt);



More information about the vlc-commits mailing list