[dvblast-devel] Add ECM PIDs to new services

Christophe Massiot git at videolan.org
Mon Feb 29 11:46:27 CET 2016


dvblast | branch: master | Christophe Massiot <cmassiot at openheadend.tv> | Mon Feb 29 11:45:28 2016 +0100| [074dda7448a974d220d366bdb99b10136dc1a3f5] | committer: Christophe Massiot

Add ECM PIDs to new services

Patch courtesy of Daniel Kucera.

> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=074dda7448a974d220d366bdb99b10136dc1a3f5
---

 demux.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/demux.c b/demux.c
index 8d4d4e3..7784f1e 100644
--- a/demux.c
+++ b/demux.c
@@ -1140,6 +1140,23 @@ static void GetPIDS( uint16_t **ppi_wanted_pids, int *pi_nb_wanted_pids,
         }
     }
 
+    const uint8_t *p_desc;
+
+    if ( b_enable_ecm )
+    {
+        j = 0;
+
+        while ((p_desc = descs_get_desc( pmt_get_descs( p_pmt ), j++ )) != NULL)
+        {
+            if ( desc_get_tag( p_desc ) != 0x09 ||
+                 !desc09_validate( p_desc ) )
+                continue;
+            *ppi_wanted_pids = realloc( *ppi_wanted_pids,
+                                  (*pi_nb_wanted_pids + 1) * sizeof(uint16_t) );
+            (*ppi_wanted_pids)[(*pi_nb_wanted_pids)++] = desc09_get_pid( p_desc );
+        }
+    }
+
     if ( i_pcr_pid != PADDING_PID && i_pcr_pid != i_pmt_pid
           && !IsIn( *ppi_wanted_pids, *pi_nb_wanted_pids, i_pcr_pid ) )
     {



More information about the dvblast-devel mailing list