[vlc-commits] demux: ts: set profile/level on avc

Francois Cartegnie git at videolan.org
Thu Jan 7 18:31:12 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jan  7 18:30:50 2016 +0100| [8a9a8d9f4887a94e4270b67d2166f3c5dfcf6faa] | committer: Francois Cartegnie

demux: ts: set profile/level on avc

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

 modules/demux/mpeg/ts.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 4e4743a..7ddf790 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -4169,6 +4169,18 @@ static bool SetupISO14496LogicalStream( demux_t *p_demux, const decoder_config_d
     return true;
 }
 
+static void SetupAVCDescriptors( demux_t *p_demux, ts_pes_es_t *p_es, const dvbpsi_pmt_es_t *p_dvbpsies )
+{
+    const dvbpsi_descriptor_t *p_dr = PMTEsFindDescriptor( p_dvbpsies, 0x28 );
+    if( p_dr && p_dr->i_length >= 4 )
+    {
+        p_es->fmt.i_profile = p_dr->p_data[0];
+        p_es->fmt.i_level = p_dr->p_data[2];
+        msg_Dbg( p_demux, "     - found AVC_video_descriptor profile=0x%"PRIx8" level=0x%"PRIx8,
+                 p_es->fmt.i_profile, p_es->fmt.i_level );
+    }
+}
+
 static void SetupISO14496Descriptors( demux_t *p_demux, ts_pes_es_t *p_es,
                                       const ts_pmt_t *p_pmt, const dvbpsi_pmt_es_t *p_dvbpsies )
 {
@@ -5341,6 +5353,9 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_dvbpsipmt )
             case 0x12:
                 SetupISO14496Descriptors( p_demux, &p_pes->es, p_pmt, p_dvbpsies );
                 break;
+            case 0x1b:
+                SetupAVCDescriptors( p_demux, &p_pes->es, p_dvbpsies );
+                break;
             case 0x83:
                 /* LPCM (audio) */
                 PMTSetupEs0x83( p_dvbpsipmt, &p_pes->es, p_dvbpsies->i_pid );



More information about the vlc-commits mailing list